public void doesMeetMinimumValueLength() { intFilter = new IntegerFilter(new ErrorHandler(), 2); string mockInput = "1,2"; Assert.IsTrue(intFilter.GetHighestSummedContinguousCombination(mockInput).ErrorMessages.Count == 0); }
public void returnsFirstMatchingInstance() { intFilter = new IntegerFilter(new ErrorHandler()); string mockInput = "1,2,3,1"; var result = intFilter.GetHighestSummedContinguousCombination(mockInput); Assert.IsTrue( result.HighestSummedCombination.Integers[0] == 1 && result.HighestSummedCombination.Integers[1] == 2 && result.HighestSummedCombination.Integers[2] == 3 && result.HighestSummedCombination.Integers[0] != 2 ); }
public void init() { intFilter = new IntegerFilter(new ErrorHandler()); }