Ejemplo n.º 1
0
        public void ReplaceFives_ReplacesFivesWithPong_FiveIsPong()
        {
            // Arrange
              int nextNumber = 5;
              ArrayList testFivesList = new ArrayList();
              testFivesList.Add(1);
              testFivesList.Add(2);
              testFivesList.Add(3);
              testFivesList.Add(4);
              testFivesList.Add("pong");
              int[] testArray = new int[5];
              testArray[0] = 1;
              testArray[1] = 2;
              testArray[2] = 3;
              testArray[3] = 4;
              testArray[4] = 5;

              // Act
              PingPongGenerator newGenerator = new PingPongGenerator(nextNumber);
              ArrayList resultFivesList = newGenerator.ReplaceFives(testArray);

              // Assert
              Assert.Equal(testFivesList, resultFivesList);
        }