public void Label_ConstructorWithTwoArguments_ReturnsConstructorArgumentLabel(string label) { // Arrange N/A ResultState resultState = new ResultState(TestStatus.Failed, label); Assert.AreEqual(label, resultState.Label); }
public void Label_ConstructorWithOneArguments_ReturnsStringEmpty() { // Arrange N/A ResultState resultState = new ResultState(TestStatus.Failed); Assert.AreEqual(string.Empty, resultState.Label); }
public void Status_ConstructorWithTwoArguments_ReturnsConstructorArgumentStatus(TestStatus status) { // Arrange N/A ResultState resultState = new ResultState(status, string.Empty); Assert.AreEqual(status, resultState.Status); }
public void RunTests(MethodInfo method, ResultState resultState, int assertionCount) { var test = _builder.BuildFrom(method); var result = TestBuilder.RunTest(test, _testObject); Assert.That(result.ResultState, Is.EqualTo(resultState), "Wrong result state"); Assert.That(result.AssertCount, Is.EqualTo(assertionCount), "Wrong assertion count"); }
void VerifyResultState(ResultState expectedState, string message ) { Assert.That( result.ResultState , Is.EqualTo( expectedState ) ); //if ( expectedState == ResultState.Error ) // Assert.That(result.Message, Is.EqualTo("System.Exception : " + message)); //else Assert.That(result.Message, Is.EqualTo(message)); }
public void Label_ConstructorWithTwoArgumentsLabelArgumentIsNull_ReturnsEmptyString() { // Arrange N/A ResultState resultState = new ResultState(TestStatus.Failed, null); Assert.AreEqual(string.Empty, resultState.Label); }
/// <summary> /// Verify that a Type is runnable, then run it and /// verify the result. /// </summary> public static void IsRunnable(Type type, ResultState resultState) { TestSuite suite = TestBuilder.MakeFixture(type); Assert.NotNull(suite, "Unable to construct fixture"); Assert.AreEqual(RunState.Runnable, suite.RunState); ITestResult result = TestBuilder.RunTest(suite); Assert.AreEqual(resultState, result.ResultState); }
public static void IsRunnable(Type type, string name, ResultState resultState) { Test test = TestBuilder.MakeTestCase(type, name); Assert.That(test.RunState, Is.EqualTo(RunState.Runnable)); object testObject = Activator.CreateInstance(type); ITestResult result = TestBuilder.RunTest(test, testObject); if (result.HasChildren) // In case it's a parameterized method result = (ITestResult)result.Children[0]; Assert.That(result.ResultState, Is.EqualTo(resultState)); }
object ToXmlString (ResultState resultState) { if (resultState == ResultState.Success) return "Success"; else if (resultState == ResultState.Inconclusive) return "Inconclusive"; else if (resultState == ResultState.Ignored) return "Ignored"; else return "Failure"; }
public void ToString_Constructor_ReturnsExpectedString(TestStatus status, string label, string expected) { ResultState resultState = new ResultState(status, label); Assert.AreEqual(expected, resultState.ToString()); }
public void Site_ConstructorWithTwoArguments_ReturnsTest(string label) { ResultState resultState = new ResultState(TestStatus.Failed, label); Assert.AreEqual(FailureSite.Test, resultState.Site); }
public void Site_ConstructorWithOneArguments_ReturnsTest() { ResultState resultState = new ResultState(TestStatus.Failed); Assert.AreEqual(FailureSite.Test, resultState.Site); }
public void Label_ConstructorWithTwoArgumentsLabelArgumentIsNull_ReturnsEmptyString() { ResultState resultState = new ResultState(TestStatus.Failed, null); Assert.AreEqual(string.Empty, resultState.Label); }
public void Label_ConstructorWithTwoArguments_ReturnsConstructorArgumentLabel(string label) { ResultState resultState = new ResultState(TestStatus.Failed, label); Assert.AreEqual(label, resultState.Label); }
public void Status_ConstructorWithTwoArguments_ReturnsConstructorArgumentStatus(TestStatus status) { ResultState resultState = new ResultState(status, string.Empty); Assert.AreEqual(status, resultState.Status); }
public void Label_ConstructorWithOneArguments_ReturnsStringEmpty() { ResultState resultState = new ResultState(TestStatus.Failed); Assert.AreEqual(string.Empty, resultState.Label); }
public void ToString_Constructor_ReturnsExepectedString(TestStatus status, string label, string expected) { // Arrange N/A ResultState resultState = new ResultState(status, label); Assert.AreEqual(expected, resultState.ToString()); }
public void Site_ConstructorWithThreeArguments_ReturnsSite(string label, FailureSite site) { ResultState resultState = new ResultState(TestStatus.Failed, label, site); Assert.AreEqual(site, resultState.Site); }