예제 #1
0
        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));
        }
예제 #2
0
        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);
        }