예제 #1
0
        public void WhenGameRulesRotationDictionaryDoesNotContainPieceType_InputValueIsReturned()
        {
            Dictionary <int, int> mockPieceRotations = new Dictionary <int, int>();

            mockPieceRotations.Add(3, 6);

            GameRules systemUnderTest = new GameRules();

            systemUnderTest.PieceRotations = mockPieceRotations;

            int pieceToRotateTo = systemUnderTest.GetGamePieceRotation(0);

            Assert.AreEqual(0, pieceToRotateTo);
        }
예제 #2
0
        public void WhenGameRulesRotationDictionaryContainsPieceType_ReturnsMatchValue()
        {
            Dictionary <int, int> mockPieceRotations = new Dictionary <int, int>();

            mockPieceRotations.Add(3, 6);

            GameRules systemUnderTest = new GameRules();

            systemUnderTest.PieceRotations = mockPieceRotations;

            int pieceToRotateTo = systemUnderTest.GetGamePieceRotation(3);

            Assert.AreEqual(6, pieceToRotateTo);
        }