public void ExecTestCase_AppliesCorrectNumberOfBindingsMultipleFacettes() { var n = typeof(TestyHarness); TestyHarness.valueSets.Clear(); IOCSetup(); Api.CreateFacette("TestFac", new List <object>() { 1, 2, 3 }); Api.CreateFacette("TestFac2", new List <object>() { 4, 5, 6 }); Api.BeginTestCase(n.AssemblyQualifiedName, null); Api.AddFacette("TestFac", 1, 2); Api.AddFacette("TestFac2", 1, 1); var coll = new AssertCollection(); coll.Push(() => true); Api.CommitTestCaseCode(coll); Api.ExecTestCase(); var res = Api.GetResults(); Assert.AreEqual(18, res.Count); }
public void AddFacette_Throws_IfNoTestCaseWasBegun() { var n = typeof(TestyHarness); IOCSetup(); try { Api.CreateFacette("TestFac", new List <object>() { 1, 2, 3 }); Api.AddFacette("TestFac", 1, 1); Assert.Fail("AddFacette did not throw, when no testcase was started."); } catch (NoTestCaseBegunException) { } }
public void AddFacette_AddsFacetteToCurrentTestContext() { var theContext = A.Fake <ITestContext>(); IOC.Reset(); IOC.Register <ITestEnvironment>(() => fakeTev); IOC.Register <ITestContext>(() => theContext); var n = typeof(TestyHarness); Api.CreateFacette("TestFac", new List <object>() { 1, 2, 3 }); Api.BeginTestCase(n.AssemblyQualifiedName, null); Api.AddFacette("TestFac", 1, 2); A.CallTo(() => theContext.AddFacette("TestFac", 1, 2)).MustHaveHappened(); }
public void ExecTestCase_AppliesBindings() { var n = typeof(TestyHarness); IOCSetup(); Api.CreateFacette("TestFac", new List <object>() { 1, 2, 3 }); Api.BeginTestCase(n.AssemblyQualifiedName, null); Api.AddFacette("TestFac", 1, 1); var coll = new AssertCollection(); coll.Push(() => true); Api.CommitTestCaseCode(coll); Api.ExecTestCase(); Assert.AreEqual(3, TestyHarness.valueSets.Count); }
public void AddFacette(string facetteName, int minValues, int maxValues) { Api.AddFacette(facetteName, minValues, maxValues); }