public void OnHasNoneWhichIsNull_WithNull_ShouldReturnSuccess() { HasNoneAssertion <string> assertion = HasNoneAssertion(s => s.IsNull()); ValueAssertionResult result = assertion.AssertValue(null); result.ExAssert(r => r.Member(x => x.succeeded).IsTrue() .Member(x => x.actualValueString).IsEqualTo("null") .Member(x => x.expectationString).IsEqualTo(ComposeLog.Expected("0 matches"))); }
public void OnHasNoneWhichIsNull_WithArrayHavingNull_ShouldReturnFailure() { HasNoneAssertion <string> assertion = HasNoneAssertion(s => s.IsNull()); ValueAssertionResult result = assertion.AssertValue(new string[] { null }); result.ExAssert(r => r.Member(x => x.succeeded).IsFalse() .Member(x => x.actualValueString).IsEqualTo("<1 match>".NewLine() .Add("null")) .Member(x => x.expectationString).IsEqualTo(ComposeLog.Expected("0 matches").NewLine() .Add(ComposeLog.Expected("null")))); }
public void OnHasNoneWhichIsNull_WithArrayHavingStringy_ShouldReturnSuccess() { HasNoneAssertion <string> assertion = HasNoneAssertion(x => x.IsNull()); ValueAssertionResult result = assertion.AssertValue(new[] { "Stringy" }); result.ExAssert(r => r.Member(x => x.succeeded).IsTrue() .Member(x => x.actualValueString).IsEqualTo("<0 matches>".NewLine() .Add("'Stringy'")) .Member(x => x.expectationString).IsEqualTo(ComposeLog.Expected("0 matches").NewLine() .Add(ComposeLog.Expected("null")))); }