예제 #1
0
        public void WithEmptyEnumerable_ShouldReturnFailure()
        {
            IsNotEmptyAssertion <string> assertion = IsNotEmptyAssertion();
            ValueAssertionResult         result    = assertion.AssertValue(new string[0]);

            Assert.AreEqual("<empty>", result.actualValueString);
            Assert.AreEqual(ComposeLog.Expected("not empty"), result.expectationString);
            Assert.IsFalse(result.succeeded);
        }
예제 #2
0
        public void WithEnumerableHavingOneString_ShouldReturnSuccess()
        {
            IsNotEmptyAssertion <string> assertion = IsNotEmptyAssertion();
            ValueAssertionResult         result    = assertion.AssertValue(new[] { "Stringy" });

            Assert.AreEqual("['Stringy']", result.actualValueString);
            Assert.AreEqual(ComposeLog.Expected("not empty"), result.expectationString);
            Assert.IsTrue(result.succeeded);
        }