Ejemplo n.º 1
0
        public void Assert_WithAnyString_ShouldReturnSuccess()
        {
            IsNotNullAssertion <string> assertion = IsNotNullAssertion <string>();
            ValueAssertionResult        result    = assertion.AssertValue("AnyString");

            Assert.IsTrue(result.succeeded);
            Assert.AreEqual("'AnyString'", result.actualValueString);
            Assert.AreEqual("(expected: not null)", result.expectationString);
        }
Ejemplo n.º 2
0
        public void Assert_WithNull_ShouldReturnFailure()
        {
            IsNotNullAssertion <string> assertion = IsNotNullAssertion <string>();
            ValueAssertionResult        result    = assertion.AssertValue(null);

            Assert.IsFalse(result.succeeded);
            Assert.AreEqual("null", result.actualValueString);
            Assert.AreEqual("(expected: not null)", result.expectationString);
        }