Пример #1
0
        public void Test3()
        {
            var task   = new TwoSumTask();
            var result = task.TwoSum(new[] { 3, 3 }, 6);

            Assert.AreEqual(new[] { 0, 1 }, result);
        }
Пример #2
0
        public void Test2()
        {
            var task   = new TwoSumTask();
            var result = task.TwoSum(new[] { 3, 2, 4 }, 6);

            Assert.AreEqual(new[] { 1, 2 }, result);
        }
Пример #3
0
        public void TwoSumTestCase3()
        {
            var input  = new[] { 3, 3 };
            var target = 6;

            TwoSumTask.TwoSum(input, target).SequenceEqual(new[] { 0, 1 }).Should().BeTrue();
        }
Пример #4
0
        public void Test1()
        {
            var task   = new TwoSumTask();
            var result = task.TwoSum(new[] { 2, 7, 11, 15 }, 9);

            Assert.AreEqual(new[] { 0, 1 }, result);
        }
Пример #5
0
        public void TwoSumTestCase1()
        {
            var input  = new[] { 2, 7, 11, 15 };
            var target = 9;

            TwoSumTask.TwoSum(input, target).SequenceEqual(new[] { 0, 1 }).Should().BeTrue();
        }