public void EraserDegrades() { WriterActions writer = new WriterActions(); writer.ProcessInput("how much wood would."); writer.Erase("much w"); Assert.AreEqual(1994, writer.pencil.GetCurrentEraserDurability()); }
public void EraserDurabilityWhenEmptyStringErased() { WriterActions writer = new WriterActions(); writer.ProcessInput("how much wood would."); writer.Erase(""); Assert.AreEqual(2000, writer.pencil.GetCurrentEraserDurability()); }
public void EraseNoText() { WriterActions writer = new WriterActions(); writer.ProcessInput("how much wood would."); writer.Erase(""); Assert.AreEqual("how much wood would.", string.Join(null, writer.paper.ToArray())); }
public void EraserDegradesWhileErasing() { WriterActions writer = new WriterActions(); writer.ProcessInput("Buffalo Bill"); writer.pencil.DecreaseEraserDurability(1997); // Degrade eraser to three. writer.Erase("Bill"); Assert.AreEqual("Buffalo B ", string.Join(null, writer.paper.ToArray())); }
public void EraseWhenEraserDurabilityZero() { WriterActions writer = new WriterActions(); writer.ProcessInput("how much wood would."); writer.pencil.DecreaseEraserDurability(2000); // Degrade eraser to zero. writer.Erase("how "); Assert.AreEqual("how much wood would.", string.Join(null, writer.paper.ToArray())); }