Esempio n. 1
0
        public void NullOrEmptyArray_Success()
        {
            int[] arr    = null;
            var   sol    = new ThirdMaxNumber(arr);
            var   result = sol.GetThirdMax();

            Assert.AreEqual(0, result);
        }
Esempio n. 2
0
        public void FourthArray_Success()
        {
            int[] arr    = { 1, 2, -2147483648 };
            var   sol    = new ThirdMaxNumber(arr);
            var   result = sol.GetThirdMax();

            Assert.AreEqual(-2147483648, result);
        }
Esempio n. 3
0
        public void FifthArray_Success()
        {
            int[] arr    = { 1, 1, 2 };
            var   sol    = new ThirdMaxNumber(arr);
            var   result = sol.GetThirdMax();

            Assert.AreEqual(2, result);
        }
Esempio n. 4
0
        public void ThirdArray_Success()
        {
            int[] arr    = { 2, 2, 3, 1 };
            var   sol    = new ThirdMaxNumber(arr);
            var   result = sol.GetThirdMax();

            Assert.AreEqual(1, result);
        }