aboutsummaryrefslogtreecommitdiffstatsci
diff options
context:
space:
mode:
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>2020-01-27 16:06:52 +0100
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>2020-01-27 16:06:52 +0100
commit29882ffc534abcb2d72ebe7838f0d9304aef66d7 (patch)
treec5f7a2356c485639b8808b15691624f5afee04bd
parent199019201a399a93acaf90b6ccb4d52cede6b799 (diff)
add several NUnit testsappveyorNUnit
-rw-r--r--Crow.sln2
-rw-r--r--unitTests/Program.cs32
-rw-r--r--unitTests/unitTests.csproj2
3 files changed, 28 insertions, 8 deletions
diff --git a/Crow.sln b/Crow.sln
index df89d910..0c8f469a 100644
--- a/Crow.sln
+++ b/Crow.sln
@@ -39,6 +39,8 @@ Global
{1E5C7065-28F9-4A1A-A2FB-DB5E03A63CB3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0CC6DFAB-2E4A-4786-976C-89053D5EA6A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0CC6DFAB-2E4A-4786-976C-89053D5EA6A2}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {0CC6DFAB-2E4A-4786-976C-89053D5EA6A2}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {0CC6DFAB-2E4A-4786-976C-89053D5EA6A2}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
Policies = $0
diff --git a/unitTests/Program.cs b/unitTests/Program.cs
index 8fad7994..0211c5a2 100644
--- a/unitTests/Program.cs
+++ b/unitTests/Program.cs
@@ -6,21 +6,37 @@ using NUnit.Framework;
namespace unitTests
{
[TestFixture]
- public class Tests
+ public class Instantiator
{
-
- void instanciate ()
+ [Test]
+ public void Widget ()
{
- Instantiator.CreateFromImlFragment (null, @"<Widget Background='Blue' Tag='{test}'/>");
+ Assert.DoesNotThrow (()
+ => Crow.IML.Instantiator.CreateFromImlFragment (null, @"<Widget/>")
+ , "test itor failed");
+ }
+ [Test]
+ public void Label ()
+ {
+ Assert.DoesNotThrow (()
+ => Crow.IML.Instantiator.CreateFromImlFragment (null, @"<Label Text='this is a test'/>")
+ , "test itor failed");
+ }
+ [Test]
+ public void TemplatedControl ()
+ {
+ Assert.DoesNotThrow (()
+ => Crow.IML.Instantiator.CreateFromImlFragment (null, @"<CheckBox IsChecked='false'/>")
+ , "test itor failed");
}
-
-
[Test]
- public void InstanciatorTest ()
+ public void SimpleBinding ()
{
- Assert.DoesNotThrow (instanciate, "test itor failed");
+ Assert.DoesNotThrow (()
+ => Crow.IML.Instantiator.CreateFromImlFragment (null, @"<Widget Background='Blue' Tag='{test}'/>")
+ , "test itor failed");
}
}
diff --git a/unitTests/unitTests.csproj b/unitTests/unitTests.csproj
index 6e4b527c..533903b6 100644
--- a/unitTests/unitTests.csproj
+++ b/unitTests/unitTests.csproj
@@ -5,6 +5,8 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="NUnit" Version="3.12.0" />
+ <PackageReference Include="NUnit3TestAdapter" Version="3.16.1" />
+ <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.4.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Crow\Crow.csproj" />