public void CanReadWhiteSpaces_AutomaticlyMakesAnInitialReadOnStart() { var input = new StringReader(" abc"); var reader = new InputReader(input); Assert.True(reader.ReadNextLine()); reader.SkipWhiteSpaces(); Assert.AreEqual('a', reader.CurrentChar); Assert.AreEqual(2, reader.Index); }
public void CanReadWhiteSpaces() { var input = new StringReader("a bc"); var reader = new InputReader(input); Assert.True(reader.ReadNextLine()); Assert.True(reader.Read()); Assert.True(reader.Read()); reader.SkipWhiteSpaces(); Assert.AreEqual('b',reader.CurrentChar); Assert.AreEqual(3,reader.Index); }