Exemple #1
0
 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>";
 }
Exemple #2
0
        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 });
            }
        }
Exemple #3
0
 public void SetUp()
 {
     theConstraint        = new EmptyConstraint();
     expectedDescription  = "<empty>";
     stringRepresentation = "<empty>";
 }
Exemple #4
0
 protected virtual void VisitEmpty(EmptyConstraint node)
 {
 }
 public void SetUp()
 {
     theConstraint = new EmptyConstraint();
     expectedDescription = "<empty>";
     stringRepresentation = "<empty>";
 }
Exemple #6
0
 protected virtual void VisitEmpty(EmptyConstraint node)
 {
 }