/**
* Simulates a dragging operation for resizing on the NE corner.
*/
public void testDragResizeNe() {
Point2D origin = new Point2D.Double(0, 0);
Dimension2D minimumSize = new DoubleDimension(20, 20);
// start dragging somewhere in the NW handle (322+, 5-)
selection.startDragging(324, 3);
assertTrue(selection.isDragging());
// make it a little bigger
setFullResizeExpectations(minimumSize);
mockNode.expects(once()).method("getParent")
.will(returnValue(mockParent.proxy()));
selection.updatePosition(340.0, -10.0);
// and draw it
// don't forget that sizes are truncated to the local system'
Constraint[] params = {eq(2.0), eq(-8.0), eq(336.0), eq(433.0), NULL};
mockDrawingContext.expects(once()).method("drawRectangle").
with(params);
selection.draw((DrawingContext) mockDrawingContext.proxy());
// stop dragging
mockOperations.expects(once()).method("resizeElement").
with(eq(selection.getElement()), eq(new Point2D.Double(2.0, -8.0)),
eq(new DoubleDimension(336.0, 433.0)));
selection.stopDragging(340.0, -10.0);
assertFalse(selection.isDragging());
}