public void Test_Cost_sum_result_with_3_elements() { //arrange int[] costArray = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; int groupSize = 3; int[] expected = { 6, 15, 24, 21 }; INumberSumHandler target = new StubNumberSumHandler(); //Act int[] actual = target.add(costArray, groupSize); //Assert CollectionAssert.AreEqual(expected, actual); }
public void Test_Revenue_sum_result_with_4_elements() { //Arrange int[] costArray = { 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21 }; int groupSize = 4; int[] expected = { 50, 66, 60 }; INumberSumHandler target = new StubNumberSumHandler(); //Act int[] actual = target.add(costArray, groupSize); //Assert CollectionAssert.AreEqual(expected, actual); }