public void Given_array_When_find_sum_Then_return() { var nums = new int[] { 2, 7, 11, 15 }; var result = TwoSumII.TwoSum(nums, 9); Assert.AreEqual(2, result[0]); Assert.AreEqual(7, result[1]); }
public void TestMethod1(int[] numbers, int target, int[] expected) { // Arrange TwoSumII question = new TwoSumII(); // Act int[] actual = question.TwoSum(numbers, target); // Assert CollectionAssert.AreEqual(expected, actual); }