private void AddSecondLongerListsTest(IListNumbersOperator listNumbersOperator) { int onesDigit = 9; int tensDigit = 5; int hundredsDigit = 7; int thousandsDigit = 9; Node <int> first = CreateList(onesDigit, tensDigit, hundredsDigit, thousandsDigit); onesDigit = 7; tensDigit = 4; hundredsDigit = 8; thousandsDigit = 8; int tenThousandsDigit = 9; Node <int> second = CreateList(onesDigit, tensDigit, hundredsDigit, thousandsDigit, tenThousandsDigit); onesDigit = 6; tensDigit = 0; hundredsDigit = 6; thousandsDigit = 8; tenThousandsDigit = 0; int hundredThousandsDigit = 1; Node <int> expected = CreateList(onesDigit, tensDigit, hundredsDigit, thousandsDigit, tenThousandsDigit, hundredThousandsDigit); Node <int> result = listNumbersOperator.AddNumbers(first, second); AssertResult(expected, result); }
private void RunTests(IListNumbersOperator listNumbersOperator) { AddEqualListsTest(listNumbersOperator); AddFirstLongerListsTest(listNumbersOperator); AddSecondLongerListsTest(listNumbersOperator); }