Exemple #1
0
        public void Creation()
        {
            IDescription description = new StringDescription(new StringBuilder("description"));
            IDescription missmatchDescription = new StringDescription(new StringBuilder("was missmatch"));

            AssertException e = new AssertException();
            AssertEx.That(e.Message, Is.EqualTo(""));

            e = new AssertException("Test");
            AssertEx.That(e.Message, Is.EqualTo("Test"));

            e = new AssertException(description, missmatchDescription);
            AssertEx.That(e.Message, Is.EqualTo("Expected is description, but was missmatch."));

            e = new AssertException(description, missmatchDescription, "Custom message.");
            AssertEx.That(e.Message, Is.EqualTo("Custom message.\nExpected: description\nBut was missmatch"));
        }
Exemple #2
0
 public override string ToString()
 {
     return(StringDescription.ToString(this));
 }