Пример #1
0
        public void GetDeepestCut_InputContainsNullThrowsException()
        {
            List <int?> input = new List <int?> {
                1, 2, 3, null, 5, 6
            };

            Assert.ThrowsException <ArgumentNullException>(() => { PinningModelBase.GetDeepestCut(input); });
        }
Пример #2
0
        public void GetDeepestCut_UnsortedInputThrowsException()
        {
            List <int?> input = new List <int?> {
                2, 3, 1, 4, 6, 5
            };

            Assert.ThrowsException <ArgumentException>(() => { PinningModelBase.GetDeepestCut(input); });
        }
Пример #3
0
        public void GetDeepestCut_EmptyInputReturnsNull()
        {
            List <int?> input = new List <int?>();

            int?output = PinningModelBase.GetDeepestCut(input);

            Assert.AreEqual(null, output);
        }
Пример #4
0
        public void GetDeepestCut_ValidInputReturnsDeepestCut()
        {
            List <int?> input = new List <int?> {
                1, 2, 3, 4, 5, 6
            };

            int?output = PinningModelBase.GetDeepestCut(input);

            Assert.AreEqual(6, output);
        }