コード例 #1
0
        public void ArrayWith6Numbers()
        {
            LargestNumber ln = new LargestNumber(new int[] { 20, 1, 4, 19, 21, 30 });

            int expected = 30;
            int actual   = ln.FindLargestNumber();

            Assert.AreEqual(expected, actual);
        }
コード例 #2
0
        public void ArrayWith0Numbers()
        {
            LargestNumber ln = new LargestNumber(new int[] {});

            int expected = 0;
            int actual   = ln.FindLargestNumber();

            Assert.AreEqual(expected, actual);
        }
コード例 #3
0
        public void NotLargestNumberTest()
        {
            LargestNumber ln = new LargestNumber(new int[] { 20, 1, 4, 19, 21, 30 });

            int expected = 21;
            int actual   = ln.FindLargestNumber();

            Assert.AreNotEqual(expected, actual);
        }