示例#1
0
        public void GetTheFrogAcross(char[] row1, char[] row2, char[] row3, char[] row4, char[] row5, ChallengeSet08.Frogger expected)
        {
            // Arrange
            ChallengeSet08 challenger = new ChallengeSet08();

            char[,] finalResult = new char[5, 3];
            for (int col = 0; col < 3; col++)
            {
                finalResult[0, col] = row1[col];
            }
            for (int col = 0; col < 3; col++)
            {
                finalResult[1, col] = row2[col];
            }
            for (int col = 0; col < 3; col++)
            {
                finalResult[2, col] = row3[col];
            }
            for (int col = 0; col < 3; col++)
            {
                finalResult[3, col] = row4[col];
            }
            for (int col = 0; col < 3; col++)
            {
                finalResult[4, col] = row5[col];
            }

            // Act
            ChallengeSet08.Frogger actual = challenger.GetTheFrogAcross(finalResult);

            // Assert
            Assert.Equal(expected, actual);
        }
示例#2
0
        public void CanHopAcross(int[] hopAmount, bool expected)
        {
            //Arrange
            ChallengeSet08 challenger = new ChallengeSet08();
            //Act
            bool actual = challenger.CanHopAcross(hopAmount);

            //Assert
            Assert.Equal(expected, actual);
        }