public void GivenAPencil_WhenToldToEditAtAPositionWithText_ThenTheTextWillFillTheSpace() { _paperMock.Setup(t => t.Show()).Returns(" "); _paperMock.Setup(t => t.Write('T', 10)); _sut.EditOn(10, "T", _paperMock.Object); _paperMock.Verify(t => t.Write('T', 10)); }
public void GivenASheetOfPaperWithWritingOnIt_WhenEditingIsCalled_ThenLettersOnThePageWillBeErased() { var pencil = new Pencil(); var paper = new Paper("An a day keeps the doctor away"); pencil.EditOn(3, "artichoke", paper); Assert.Equal("An artich@k@ay keeps the doctor away", paper.Show()); }