public 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}.\r\n{1}", new object[] { ex.GetType().FullName, ex.StackTrace }); } }
public void SetUp() { theConstraint = new EmptyConstraint(); expectedDescription = "<empty>"; stringRepresentation = "<empty>"; }
protected virtual void VisitEmpty(EmptyConstraint node) { }