public void WhenFinderMethodCalledReturnsLastIndexOfParameterString() { Pencil pencil = new Pencil(20, 20); Paper paper = new Paper(); Eraser eraser = new Eraser(20); pencil.Write("Hello World!", paper); Assert.AreEqual(6, eraser.Finder("World", paper)); }
public void WhenEraserFinderMethodCalledLastEditPropertySetToStartIndex() { Pencil pencil = new Pencil(500, 5); Paper paper = new Paper(); Eraser eraser = new Eraser(20); pencil.Write("Hello World", paper); eraser.Finder("World", paper); Assert.AreEqual(6, paper.LastEditIndex); }