Example #1
0
        public void PencilLengthUpdated()
        {
            WriterActions writer = new WriterActions();

            writer.ProcessInput("Hello world");
            writer.SharpenPencil();

            Assert.AreEqual(19, writer.pencil.GetLength());
        }
Example #2
0
        public void WriterSharpensPencil()
        {
            WriterActions writer = new WriterActions();

            writer.ProcessInput("Hello world");
            writer.SharpenPencil();

            Assert.AreEqual(1000, writer.pencil.GetCurrentDurability());
        }
Example #3
0
        public void SpacesWhenLengthIsZero()
        {
            WriterActions writer = new WriterActions();

            writer.pencil.SetLength(1);
            writer.pencil.SetDurability(0);
            writer.SharpenPencil();
            writer.ProcessInput("Hello world");

            Assert.AreEqual("           ", string.Join(null, writer.paper.ToArray()));
        }