Esempio n. 1
0
        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")));
        }
Esempio n. 2
0
        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"))));
        }
Esempio n. 3
0
        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"))));
        }