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

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

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

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

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

            Assert.AreEqual(-3, result);
        }
Пример #6
0
        public void HighestForEachLoopTest(int[] nums, int expected)
        {
            var result = Highest.HighestForEachLoop(nums);

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