コード例 #1
0
        void ReadWord_WhenCoordsInMiddleOfWord_ReadsWordFromBeginning()
        {
            //arrange
            var testWord = "TEST";
            var board    = new BoardLettersModel(4, 4);

            board.PlaceWord(0, 0, testWord, new Direction(0, 1));

            //act
            var word = board.ReadWord(0, 2, new Direction(0, 1));

            //assert
            Assert.Equal(testWord, word);
        }
コード例 #2
0
        void ReadWord_WhenCalled_ReadsWord()
        {
            //arrange
            var testWord = "TEST";
            var board    = new BoardLettersModel(4, 4);

            board.PlaceWord(0, 0, testWord, new Direction(0, 1));

            //act
            var word = board.ReadWord(0, 0, new Direction(0, 1));

            //assert
            Assert.Equal(testWord, word);
        }