Exemplo n.º 1
0
        public void returnsAnInteger()
        {
            int[] cloudArray = new int[] { };

            var cloudJumps = new CloudJumps();

            int ourInteger = cloudJumps.FindNumberOfJumps(cloudArray);

            bool ourIntegerIsAnInteger = (ourInteger.GetType() == typeof(int));

            bool numberIsAnInteger = true;

            Assert.AreEqual(ourIntegerIsAnInteger, numberIsAnInteger);
        }
Exemplo n.º 2
0
        public void FindNumberOfJumpsShouldReturnThreeAgain()
        {
            const int numberOfClouds = 6;

            int[] cloudArray = new int[numberOfClouds] {
                0, 0, 0, 1, 0, 0
            };
            var expectedResult = 3;

            var cloudJumps = new CloudJumps();

            int result = cloudJumps.FindNumberOfJumps(cloudArray);

            Assert.AreEqual(expectedResult, result);
        }