protected override void SetUp() { Matcher = new EmptyConstraint(); GoodValues = new object[] { string.Empty, new object[0], new System.Collections.ArrayList() }; BadValues = new object[] { "Hello", new object[] { 1, 2, 3 } }; Description = "<empty>"; }
public void AssertTestCase_TestCaseFailing_MessageIsAvailable() { var sut = "not empty string"; var ctr = new EmptyConstraint(); var xmlContent = "<test><system></system><assert></assert></test>"; var testSuite = new TestSuite(); try { testSuite.AssertTestCase(sut, ctr, xmlContent); } catch (AssertionException ex) { Console.WriteLine(ex.Message); Assert.That(ex.Message, Is.StringContaining("empty")); } catch (Exception ex) { Assert.Fail("The exception should have been an AssertionException but was {0}.", new object[] { ex.GetType().FullName }); } }
public void SetUp() { TheConstraint = new EmptyConstraint(); ExpectedDescription = "<empty>"; StringRepresentation = "<empty>"; }
public void SetUp() { theConstraint = new EmptyConstraint(); expectedDescription = "<empty>"; stringRepresentation = "<empty>"; }
public void AssertTestCase_TestCaseFailing_StackTraceIsFilledWithXml() { var sut = "not empty"; var ctr = new EmptyConstraint(); var xmlContent = "<test><system></system><assert></assert></test>"; var testSuite = new TestSuite(); try { testSuite.AssertTestCase(sut, ctr, xmlContent); } catch (AssertionException ex) { Assert.That(ex.StackTrace, Is.EqualTo(xmlContent)); } catch (Exception ex) { Assert.Fail("The exception should have been an AssertionException but was {0}.", new object[] { ex.GetType().FullName }); } }