Exemple #1
0
        public void CanPlay_GivenWildCurrentCardAndNullCurrentWildColor_ShouldThrow()
        {
            StandardRuleProvider target = new StandardRuleProvider();
            bool canPlay = target.CanPlay(new Card(Color.Red, Value.Five), new Card(Color.Wild, Value.Wild), null);

            return;
        }
Exemple #2
0
        public void CanPlay_GivenNullCard_ShouldThrow()
        {
            StandardRuleProvider target = new StandardRuleProvider();
            bool canPlay = target.CanPlay(null, new Card(Color.Red, Value.Five), null);

            return;
        }
Exemple #3
0
        public void CanPlay_GivenColorMatchingCurrentWildColor_ShouldReturnTrue()
        {
            StandardRuleProvider target = new StandardRuleProvider();
            bool canPlay = target.CanPlay(new Card(Color.Green, Value.Three), new Card(Color.Wild, Value.Wild), Color.Green);

            Assert.IsTrue(canPlay);

            return;
        }
Exemple #4
0
        public void CanPlay_GivenValueMatch_ShouldReturnTrue()
        {
            StandardRuleProvider target = new StandardRuleProvider();
            bool canPlay = target.CanPlay(new Card(Color.Yellow, Value.Two), new Card(Color.Red, Value.Two), null);

            Assert.IsTrue(canPlay);

            return;
        }
Exemple #5
0
        public void CanPlay_GivenColorMatch_ShouldReturnTrue()
        {
            StandardRuleProvider target = new StandardRuleProvider();
            bool canPlay = target.CanPlay(new Card(Color.Blue, Value.One), new Card(Color.Blue, Value.Nine), null);

            Assert.IsTrue(canPlay);

            return;
        }
Exemple #6
0
        public void CanPlay_GivenWildCard_ShouldReturnTrue()
        {
            StandardRuleProvider target = new StandardRuleProvider();
            bool canPlay = target.CanPlay(new Card(Color.Wild, Value.WildDrawFour), new Card(Color.Red, Value.Five), null);

            Assert.IsTrue(canPlay);

            return;
        }
Exemple #7
0
        public void CanPlay_GivenColorNotMatchingCurrentWildColor_ShouldReturnFalse()
        {
            StandardRuleProvider target = new StandardRuleProvider();
            bool canPlay = target.CanPlay(new Card(Color.Red, Value.Four), new Card(Color.Wild, Value.WildDrawFour), Color.Blue);

            Assert.IsFalse(canPlay);

            return;
        }
Exemple #8
0
        public void CanPlay_GivenValueMismatch_ShouldReturnFalse()
        {
            StandardRuleProvider target = new StandardRuleProvider();
            bool canPlay = target.CanPlay(new Card(Color.Green, Value.Reverse), new Card(Color.Blue, Value.DrawTwo), null);

            Assert.IsFalse(canPlay);

            return;
        }
Exemple #9
0
        public void CanPlay_GivenColorMismatch_ShouldReturnFalse()
        {
            StandardRuleProvider target = new StandardRuleProvider();
            bool canPlay = target.CanPlay(new Card(Color.Blue, Value.Eight), new Card(Color.Red, Value.Five), null);

            Assert.IsFalse(canPlay);

            return;
        }