Esempio n. 1
0
        public void Nums_null_Target_9()
        {
            //arrange
            int[] nums     = null;
            int[] expected = new int[2] {
                -1, -1
            };
            int target = 9;

            //act
            GazpromTest.Solution s = new GazpromTest.Solution();
            int[] actual           = s.TwoSum(nums, target);

            //assert
            СheckExpectedActual(expected, actual);
        }
Esempio n. 2
0
        public void Nums_2_7_11_15_Target_9()
        {
            //arrange
            int[] nums = new int[4] {
                2, 7, 11, 15
            };
            int[] expected = new int[2] {
                0, 1
            };
            int target = 9;

            //act
            GazpromTest.Solution s = new GazpromTest.Solution();
            int[] actual           = s.TwoSum(nums, target);

            //assert
            СheckExpectedActual(expected, actual);
        }
Esempio n. 3
0
        public void Nums_1_6_14_18_Target_20()
        {
            //arrange
            int[] nums = new int[4] {
                1, 6, 14, 18
            };
            int[] expected = new int[2] {
                1, 2
            };
            int target = 20;

            //act
            GazpromTest.Solution s = new GazpromTest.Solution();
            int[] actual           = s.TwoSum(nums, target);

            //assert
            СheckExpectedActual(expected, actual);
        }
Esempio n. 4
0
        public void Nums_4_8_13_16_Target_29()
        {
            //arrange
            int[] nums = new int[4] {
                4, 8, 13, 16
            };
            int[] expected = new int[2] {
                2, 3
            };
            int target = 29;

            //act
            GazpromTest.Solution s = new GazpromTest.Solution();
            int[] actual           = s.TwoSum(nums, target);

            //assert
            СheckExpectedActual(expected, actual);
        }
Esempio n. 5
0
        public void Nums_2_16_18_22_Target_25()
        {
            //arrange
            int[] nums = new int[4] {
                3, 16, 18, 22
            };
            int[] expected = new int[2] {
                0, 3
            };
            int target = 25;

            //act
            GazpromTest.Solution s = new GazpromTest.Solution();
            int[] actual           = s.TwoSum(nums, target);

            //assert
            СheckExpectedActual(expected, actual);
        }
Esempio n. 6
0
        public void Nums_4_4_2_2_Target_4()
        {
            //arrange
            int[] nums = new int[4] {
                4, 4, 2, 2
            };
            int[] expected = new int[2] {
                2, 3
            };
            int target = 4;

            //act
            GazpromTest.Solution s = new GazpromTest.Solution();
            int[] actual           = s.TwoSum(nums, target);

            //assert
            СheckExpectedActual(expected, actual);
        }
Esempio n. 7
0
        public void Nums_1_6_18_minus12_Target_6()
        {
            //arrange
            int[] nums = new int[4] {
                1, 6, 18, -12
            };
            int[] expected = new int[2] {
                2, 3
            };
            int target = 6;

            //act
            GazpromTest.Solution s = new GazpromTest.Solution();
            int[] actual           = s.TwoSum(nums, target);

            //assert
            СheckExpectedActual(expected, actual);
        }