public void HighestForEachLoopTest()
        {
            int[] nums   = { 10, 6, 22, 17, 3 };
            var   result = Highest.HighestForEachLoop(nums);

            Assert.AreEqual(22, result);
        }
Beispiel #2
0
        public void HighestForEachLoopTest()
        {
            int[] nums   = { -5 };
            var   result = Highest.HighestForEachLoop(nums);

            Assert.AreEqual(-5, result);
        }
Beispiel #3
0
        public void WhenTheArrayIsEmptyHighestForEachLoopReturnsMin()
        {
            int[] nums   = { };
            var   result = Highest.HighestForEachLoop(nums);

            Assert.AreEqual(int.MinValue, result);
        }
Beispiel #4
0
        public void WhenTheArrayIsOnlyNegativeHighestForEachLoop()
        {
            int[] nums   = { -1, -50, -100, -20 };
            var   result = Highest.HighestForEachLoop(nums);

            Assert.AreEqual(-1, result);
        }
Beispiel #5
0
        public void HighestForEachLoopTest()
        {
            int[] nums   = { -10, -6, -22, -17, -3 };
            var   result = Highest.HighestForEachLoop(nums);

            Assert.AreEqual(-3, result);
        }
        public void HighestForEachLoopTest(int[] nums, int expected)
        {
            var result = Highest.HighestForEachLoop(nums);

            Assert.AreEqual(expected, result);
        }
Beispiel #7
0
 public void HighestForEachLoopTest()
 {
     int[] nums = {};
     Assert.Throws <Exception>(() => Highest.HighestForEachLoop(nums));
 }