]> O.S.I.I.S - jp/crow.git/commitdiff
add several NUnit tests appveyorNUnit
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Mon, 27 Jan 2020 15:06:52 +0000 (16:06 +0100)
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Mon, 27 Jan 2020 15:06:52 +0000 (16:06 +0100)
Crow.sln
unitTests/Program.cs
unitTests/unitTests.csproj

index df89d910b716ae77bbb105152861a02d787ec888..0c8f469a75078b1b2b0308577c57dfcd8f95df43 100644 (file)
--- 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
index 8fad7994ff624e84d84dfbd8552aadc7cfc1f2d3..0211c5a241d3d4b60518fef8d7dea1a6eedb9c8c 100644 (file)
@@ -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");
                }
 
        }
index 6e4b527ce64ed056e0927f3c2c956ee2063c1862..533903b628220963815a7e5c4c573cb92e8d4f32 100644 (file)
@@ -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" />