public void TestManager_RunTest_Will_Run_Failing_Test_When_Confirm_Different_Fails_Test() { TestManager manager = new TestManager(); TestMethod method = new TestMethod(); method.Name = "FailingStubWithFailingConfirmDifferent"; method.Type = typeof(TestManagerTest); Type t = typeof(TestManagerTest); var q = from m in t.GetMembers() where m.Name == "FailingStubWithFailingConfirmDifferent" select m; method.MemberInfo = q.Single<MemberInfo>(); TestResult res = manager.RunTest(method); Confirm.Equal("The the actual value should not be equal to Not Expected Value", res.ResultText); Confirm.Equal(false, res.Passed); }
public void TestManager_RunTest_Will_Run_Failing_Test_When_Confirm_Equals_Fails_Test() { TestManager manager = new TestManager(); TestMethod method = new TestMethod(); method.Name = "FailingStubWithFailingConfirmEquals"; method.Type = typeof(TestManagerTest); Type t = typeof(TestManagerTest); var q = from m in t.GetMembers() where m.Name == "FailingStubWithFailingConfirmEquals" select m; method.MemberInfo = q.Single<MemberInfo>(); TestResult res = manager.RunTest(method); Confirm.Equal("The expected value is: [1], but the actual value is: [2]", res.ResultText); Confirm.Equal(false, res.Passed); }
public void TestManager_RunTest_Will_Run_Passing_Test_Test() { TestManager manager = new TestManager(); TestMethod method = new TestMethod(); method.Name = "PassingStub"; method.Type = typeof(TestManagerTest); method.MemberInfo = PassingStub(); TestResult res = manager.RunTest(method); Confirm.Equal(true, res.Passed); Confirm.Equal("PassingStub (PASSED)", res.ResultText); }
public void TestManager_RunTest_Will_Run_Failing_Test_When_Unhandled_Exception_Is_Thrown_Test() { TestManager manager = new TestManager(); TestMethod method = new TestMethod(); method.Name = "FailingStubWithUnhandledException"; method.Type = typeof(TestManagerTest); Type t = typeof(TestManagerTest); var q = from m in t.GetMembers() where m.Name == "FailingStubWithUnhandledException" select m; method.MemberInfo = q.Single<MemberInfo>(); TestResult res = manager.RunTest(method); Confirm.Equal(false, res.Passed); Confirm.Equal("Argument Invalid", res.ResultText); }
public void TestManager_RunTest_Will_Run_Failing_Test_When_Confirm_IsGreater_Fails_Test() { TestManager manager = new TestManager(); TestMethod method = new TestMethod(); method.Name = "FailingStubWithFailingConfirmIsGreater"; method.Type = typeof(TestManagerTest); Type t = typeof(TestManagerTest); var q = from m in t.GetMembers() where m.Name == "FailingStubWithFailingConfirmIsGreater" select m; method.MemberInfo = q.Single<MemberInfo>(); TestResult res = manager.RunTest(method); Confirm.Equal("2.3 is not greater than 4.2", res.ResultText); Confirm.Equal(false, res.Passed); }
private void LoadTests() { TestManager manager = new TestManager(); Tests = manager.GetTests(SelectedItem.Name,CurrentTestCategory); }
public void LoadTests(string testType) { TestManager manager = new TestManager(); Tests = manager.GetTests(testType,CurrentTestCategory); }