Exemplo n.º 1
0
        public void HighestDoWhileLoopTest()
        {
            int[] nums   = { -5 };
            var   result = Highest.HighestDoWhileLoop(nums);

            Assert.AreEqual(-5, result);
        }
Exemplo n.º 2
0
        public void WhenTheArrayIsAllTheSameHighestDoWhileLoopReturnsMax()
        {
            int[] nums   = { 10, 10, 10, 10 };
            var   result = Highest.HighestDoWhileLoop(nums);

            Assert.AreEqual(10, result);
        }
        public void HighestDoWhileLoopTest()
        {
            int[] nums   = { 10, 6, 22, 17, 3 };
            var   result = Highest.HighestDoWhileLoop(nums);

            Assert.AreEqual(22, result);
        }
Exemplo n.º 4
0
        public void WhenTheArrayIsOnlyNegativeHighestDoWhileLoop()
        {
            int[] nums   = { -1, -50, -100, -20 };
            var   result = Highest.HighestDoWhileLoop(nums);

            Assert.AreEqual(-1, result);
        }
Exemplo n.º 5
0
        public void WhenTheArrayIsEmptyHighestDoWhilehLoopReturnsMin()
        {
            int[] nums   = { };
            var   result = Highest.HighestDoWhileLoop(nums);

            Assert.AreEqual(int.MinValue, result);
        }
Exemplo n.º 6
0
        public void HighestDoWhileLoopTest()
        {
            int[] nums   = { -10, -6, -22, -17, -3 };
            var   result = Highest.HighestDoWhileLoop(nums);

            Assert.AreEqual(-3, result);
        }
Exemplo n.º 7
0
        public void HighestDoWhileLoopTest(int[] nums, int expected)
        {
            var result = Highest.HighestDoWhileLoop(nums);

            Assert.AreEqual(expected, result);
        }
Exemplo n.º 8
0
 public void HighestDoWhileLoopTest()
 {
     int[] nums = {};
     Assert.Throws <Exception>(() => Highest.HighestDoWhileLoop(nums));
 }