Esempio n. 1
0
        public void ReturnFalseGivenIncorrectGroupOfThree(PieceModel.Colors c1, PieceModel.Colors c2, PieceModel.Colors c3, int n)
        {
            var pieces = new List <PieceModel>
            {
                new PieceModel(n, c1, 1),
                new PieceModel(n, c2, 2),
                new PieceModel(n, c3, 3)
            };

            var piecesService = new PieceTypeCheckerService();

            Assert.IsFalse(piecesService.IsSet(pieces));
        }
Esempio n. 2
0
        public void ReturnFalseGivenIncorrectRunOfThree(int p1, int p2, int p3, PieceModel.Colors color)
        {
            var pieces = new List <PieceModel>
            {
                new PieceModel(p1, color, 1),
                new PieceModel(p2, color, 2),
                new PieceModel(p3, color, 3)
            };

            var piecesService = new PieceTypeCheckerService();

            Assert.IsFalse(piecesService.IsSet(pieces));
        }
Esempio n. 3
0
        public void ReturnTrueGivenCorrectRunOfThreeWithJokerEdgeCase()
        {
            var pieces = new List <PieceModel>
            {
                new PieceModel(12, PieceModel.Colors.Red, 1),
                new PieceModel(PieceModel.Types.Joker),
                new PieceModel(1, PieceModel.Colors.Red, 2)
            };

            var piecesService = new PieceTypeCheckerService();

            Assert.IsTrue(piecesService.IsSet(pieces));
        }
Esempio n. 4
0
        public void ReturnTrueGivenCorrectGroupOfFour(PieceModel.Colors c1, PieceModel.Colors c2,
                                                      PieceModel.Colors c3, PieceModel.Colors c4, int n)
        {
            var pieces = new List <PieceModel>
            {
                new PieceModel(n, c1, 1),
                new PieceModel(n, c2, 2),
                new PieceModel(n, c3, 3),
                new PieceModel(n, c4, 3),
            };

            var piecesService = new PieceTypeCheckerService();

            Assert.IsTrue(piecesService.IsSet(pieces));
        }