Beispiel #1
0
        public void TestNotifyDrawingEnded()
        {
            int count = 0;

            _canvasDrawer.DrawingEnded += () => count++;
            _canvasDrawer.NotifyDrawingEnded();
            Assert.AreEqual(count, 1);
            _canvasDrawer.NotifyDrawingEnded();
            Assert.AreEqual(count, 2);
        }
 /// <summary>
 /// Ends the drawing.
 /// </summary>
 private void EndDrawing(Point mousePosition)
 {
     _canvasDrawer.CreateThenExecuteDrawingCommandToDrawShapeUsingCurrentShapeDrawer(_currentDrawingShapeDrawingStartingPoint, mousePosition);
     _canvasDrawer.NotifyDrawingEnded();
 }