Пример #1
0
        public void Test_ExactlySolution_PairNotTheSame()
        {
            var actual = TwoSumLeetCode.TwoSum(new int[] { 2, 3, 4, 5 }, 6);

            Assert.AreEqual(true, actual.SequenceEqual(new int[] { 0, 2 }));
        }
Пример #2
0
        public void Test_DuplicatePairArray_Solution()
        {
            var actual = TwoSumLeetCode.TwoSum(new int[] { 3, 2, 3 }, 6);

            Assert.AreEqual(true, actual.SequenceEqual(new int[] { 0, 2 }));
        }
Пример #3
0
        public void Test_ZeroArray_Then_Throw_ArgumentException()
        {
            var actual = TwoSumLeetCode.TwoSum(new int[] { }, 0);

            Assert.AreEqual(true, actual.SequenceEqual(new int[2]));
        }