示例#1
0
        public void ShowOutput_ReplaceMultiplesOf5WithPong()
        {
            PingpongGenerator generator = new PingpongGenerator();

            CollectionAssert.AreEqual(new List <int> {
                1, 2, -1, 4, -2, -1
            }, generator.ShowOutput("6"));
        }
示例#2
0
        public void ShowOutput_ValidateUserInput()
        {
            PingpongGenerator generator = new PingpongGenerator();

            CollectionAssert.AreEqual(emptyList, generator.ShowOutput("a"));
            CollectionAssert.AreEqual(emptyList, generator.ShowOutput("-32"));
            CollectionAssert.AreEqual(emptyList, generator.ShowOutput("0"));
        }
示例#3
0
        public void ShowOutput_OneToInputNumber()
        {
            PingpongGenerator generator = new PingpongGenerator();

            CollectionAssert.AreEqual(new List <int> {
                1, 2
            }, generator.ShowOutput("2"));
        }
示例#4
0
        public void ShowOutput_GetUserInput()
        {
            PingpongGenerator generator = new PingpongGenerator();

            CollectionAssert.AreEqual(emptyList, generator.ShowOutput(""));
        }