示例#1
0
        public void CanGiveInformationForNumberIfHasAffectedCards()
        {
            const Number number = Number.One;

            var player      = new PlayerBuilder().Build();
            var otherPlayer = new Mock <IPlayer>(MockBehavior.Strict);

            otherPlayer
            .Setup(p => p.InformationAffectedCards(number))
            .Returns(new Card(Suite.White, number).AsEnumerable());

            player.CanGiveInformation(otherPlayer.Object, number).Should().BeTrue();
        }
示例#2
0
        public void CanNotGiveInformationForSuiteIfDoesNotHaveAffectedCards()
        {
            const Suite suite = Suite.White;

            var player      = new PlayerBuilder().Build();
            var otherPlayer = new Mock <IPlayer>(MockBehavior.Strict);

            otherPlayer
            .Setup(p => p.InformationAffectedCards(suite))
            .Returns(Enumerable.Empty <Card>());

            player.CanGiveInformation(otherPlayer.Object, suite).Should().BeFalse();
        }