Пример #1
0
        public void ExpectingSword_OnNinjaWithNullWeapons_ShouldFail()
        {
            // act
            var result = new WeaponedNinja(null).Evaluate(n => n.Member(x => x.Weapons).Contains("Sword"));

            // assert
            result.ExAssert(r => r.Member(x => x.succeeded).IsFalse()
                            .Member(x => x.actual).IsEqualTo("WeaponedNinja: (X)Weapons = null")
                            .Member(x => x.expectation).Contains("contains ['Sword']"));
        }
Пример #2
0
        public void ExpectingNoSwordAndShuriken_OnNullWeaponNinja_ShouldSucceed()
        {
            // act
            var result = new WeaponedNinja(null).Evaluate(n => n.Member(x => x.Weapons).DoesntContain("Sword", "Shuriken"));

            // assert
            result.ExAssert(r => r.Member(x => x.succeeded).IsTrue()
                            .Member(x => x.actual).IsEqualTo("WeaponedNinja: ( )Weapons = null")
                            .Member(x => x.expectation).Contains("doesn't contain ['Sword', 'Shuriken']"));
        }