private void Verify(LineBuffer lineBuffer, string textToAdd, string[] expectedOutput) { IEnumerable <string> result; lineBuffer.ProcessText(textToAdd, out result); string[] r = result.ToArray(); Assert.Equal <int>(expectedOutput.Length, r.Length); for (int i = 0; i < expectedOutput.Length; i++) { Assert.Equal(expectedOutput[i], r[i]); } }