From ab5a1b78295930b3c42ffc455f3fa53d5fb2dfb9 Mon Sep 17 00:00:00 2001 From: "Frank A. Krueger" Date: Tue, 13 Jun 2017 20:42:06 -0700 Subject: [PATCH] Add unit tests --- Ooui.sln | 14 ++++++++++++++ Tests/ButtonTests.cs | 18 ++++++++++++++++++ Tests/Tests.csproj | 20 ++++++++++++++++++++ 3 files changed, 52 insertions(+) create mode 100644 Tests/ButtonTests.cs create mode 100644 Tests/Tests.csproj diff --git a/Ooui.sln b/Ooui.sln index 1d14ff0..c5823a7 100644 --- a/Ooui.sln +++ b/Ooui.sln @@ -7,6 +7,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ooui", "Ooui\Ooui.csproj", EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Samples", "Samples\Samples.csproj", "{CDF8BB01-40BB-402F-8446-47AA6F1628F3}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests", "Tests\Tests.csproj", "{78F6E9E7-4322-4F87-8CE9-1EEF1B16D268}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -44,5 +46,17 @@ Global {CDF8BB01-40BB-402F-8446-47AA6F1628F3}.Release|x64.Build.0 = Release|x64 {CDF8BB01-40BB-402F-8446-47AA6F1628F3}.Release|x86.ActiveCfg = Release|x86 {CDF8BB01-40BB-402F-8446-47AA6F1628F3}.Release|x86.Build.0 = Release|x86 + {78F6E9E7-4322-4F87-8CE9-1EEF1B16D268}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {78F6E9E7-4322-4F87-8CE9-1EEF1B16D268}.Debug|Any CPU.Build.0 = Debug|Any CPU + {78F6E9E7-4322-4F87-8CE9-1EEF1B16D268}.Debug|x64.ActiveCfg = Debug|x64 + {78F6E9E7-4322-4F87-8CE9-1EEF1B16D268}.Debug|x64.Build.0 = Debug|x64 + {78F6E9E7-4322-4F87-8CE9-1EEF1B16D268}.Debug|x86.ActiveCfg = Debug|x86 + {78F6E9E7-4322-4F87-8CE9-1EEF1B16D268}.Debug|x86.Build.0 = Debug|x86 + {78F6E9E7-4322-4F87-8CE9-1EEF1B16D268}.Release|Any CPU.ActiveCfg = Release|Any CPU + {78F6E9E7-4322-4F87-8CE9-1EEF1B16D268}.Release|Any CPU.Build.0 = Release|Any CPU + {78F6E9E7-4322-4F87-8CE9-1EEF1B16D268}.Release|x64.ActiveCfg = Release|x64 + {78F6E9E7-4322-4F87-8CE9-1EEF1B16D268}.Release|x64.Build.0 = Release|x64 + {78F6E9E7-4322-4F87-8CE9-1EEF1B16D268}.Release|x86.ActiveCfg = Release|x86 + {78F6E9E7-4322-4F87-8CE9-1EEF1B16D268}.Release|x86.Build.0 = Release|x86 EndGlobalSection EndGlobal diff --git a/Tests/ButtonTests.cs b/Tests/ButtonTests.cs new file mode 100644 index 0000000..64f375e --- /dev/null +++ b/Tests/ButtonTests.cs @@ -0,0 +1,18 @@ +using System; +using Microsoft.VisualStudio.TestTools.UnitTesting; + +using Ooui; + +namespace Tests +{ + [TestClass] + public class ButtonTests + { + [TestMethod] + public void DefaultCtor () + { + var b = new Button (); + Assert.AreEqual ("", b.TextContent); + } + } +} diff --git a/Tests/Tests.csproj b/Tests/Tests.csproj new file mode 100644 index 0000000..77d81ea --- /dev/null +++ b/Tests/Tests.csproj @@ -0,0 +1,20 @@ + + + + netcoreapp2.0 + + false + + + + + + + + + + + + + +