public void GetNextLine_NoBufferedLine_ReadNextLine() { var vcfFilter = new VcfFilter(null); using (var ms = new MemoryStream(Encoding.UTF8.GetBytes("first line\nsecond line\n"))) using (var reader = new StreamReader(ms)) { string nextLine = vcfFilter.GetNextLine(reader); Assert.Equal("first line", nextLine); } }
public void GetNextLine_ReturnBufferedLine() { const string bufferedLine = "I am buffered"; var vcfFilter = new VcfFilter(null) { BufferedLine = bufferedLine }; string nextLine = vcfFilter.GetNextLine(null); Assert.Equal(bufferedLine, nextLine); }