public void IncreaseWidthTopRight() { var canvasItem = new CanvasModelItem { Width = 30, Height = 30, Left = 10, Top = 20, }; var hookPoint = new Point(40, 20); var newPoint = new Point(50, 20); var resizeOperation = new ResizeOperation(canvasItem, newPoint , new NoEffectsCanvasItemSnappingEngine()); resizeOperation.UpdateHandlePosition(newPoint); Assert.AreEqual(40D, canvasItem.Width); }
public void ItemsWithZeroHeight() { var item = new CanvasModelItem() { Left = 0, Top = 0, Width = 0, Height = 0 }; var items = new List<ICanvasItem>() { item }; var group = new CanvasItemSelection(items); Assert.AreEqual(0, group.Height); }