public void Initialize()
 {
     _canvasDrawer = new CanvasDrawerMock(new CommandsManager());
     _currentResizingShapeShapeDrawer = new ShapeDrawerMock(new Point(), new Point());
     _canvasDrawerResizingState       = new CanvasDrawerResizingState(_canvasDrawer, _currentResizingShapeShapeDrawer);
     _target = new PrivateObject(_canvasDrawerResizingState);
 }
        public void TestCanvasDrawerResizingState()
        {
            Assert.ThrowsException <ArgumentNullException>(() => new CanvasDrawerResizingState(null, new ShapeDrawerMock(new Point(), new Point())));
            Assert.ThrowsException <ArgumentNullException>(() => new CanvasDrawerResizingState(new CanvasDrawerMock(new CommandsManager()), null));
            var canvasDrawer = new CanvasDrawerMock(new CommandsManager());
            var currentResizingShapeShapeDrawer = new ShapeDrawerMock(new Point(), new Point());
            var canvasDrawerResizingState       = new CanvasDrawerResizingState(canvasDrawer, currentResizingShapeShapeDrawer);
            var target = new PrivateObject(canvasDrawerResizingState);

            Assert.AreSame(target.GetFieldOrProperty(MEMBER_VARIABLE_NAME_CANVAS_DRAWER), canvasDrawer);
            Assert.AreSame(target.GetFieldOrProperty(MEMBER_VARIABLE_NAME_CURRENT_RESIZING_SHAPE_SHAPE_DRAWER), currentResizingShapeShapeDrawer);
            Assert.AreSame(target.GetFieldOrProperty(MEMBER_VARIABLE_NAME_CURRENT_RESIZING_SHAPE_OLD_DRAWING_ENDING_POINT), currentResizingShapeShapeDrawer.DrawingEndingPoint);
        }