Exemple #1
0
        public void TestShapeDrawer()
        {
            Assert.ThrowsException <ArgumentNullException>(() => new ShapeDrawerMock(null, new Point()));
            Assert.ThrowsException <ArgumentNullException>(() => new ShapeDrawerMock(new Point(), null));
            var drawingStartingPoint = new Point();
            var drawingEndingPoint   = new Point();
            var shapeDrawer          = new ShapeDrawerMock(drawingStartingPoint, drawingEndingPoint);
            var target = new PrivateObject(shapeDrawer);

            Assert.AreSame(target.GetFieldOrProperty(MEMBER_VARIABLE_NAME_DRAWING_STARTING_POINT), drawingStartingPoint);
            Assert.AreSame(target.GetFieldOrProperty(MEMBER_VARIABLE_NAME_DRAWING_ENDING_POINT), drawingEndingPoint);
        }
 public void Initialize()
 {
     _shapeDrawer = new ShapeDrawerMock(new Point(), new Point());
     _target      = new PrivateObject(_shapeDrawer);
 }