public void Execute_ExecutesSingleStep() { bool stepSet = false; theCollection.Push(() => { stepSet = true; return(true); }); theCollection.Execute(); Assert.IsTrue(stepSet); }
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 ExecTestCase_Throws_NoTestCaseStartedException_IfNoTestCaseWasBegun() { var n = typeof(TestyHarness); IOCSetup(); try { var coll = new AssertCollection(); coll.Push(() => true); Api.CommitTestCaseCode(coll); Api.ExecTestCase(); Assert.Fail("Did not throw execption!"); } catch (NoTestCaseStartedException) { // All good! return; } }
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); }