public void SampleTest() { var reader = new ReaderStub(new[] { "1", "0", "1", "0", "1" }); var length = 0; using (var calculator = new ConsequentOnesCalculator(reader)) { length = calculator.GetOnesLongestSequenceLength(5); } Assert.AreEqual(1, length); }
public void OnlyZeroTest() { var reader = new ReaderStub(new[] { "0" }); var length = 0; using (var calculator = new ConsequentOnesCalculator(reader)) { length = calculator.GetOnesLongestSequenceLength(1); } Assert.AreEqual(0, length); }