public void testCloningConstructorDoesSo() { final Dimension2D src = new Dimension(100, 50); final PDimension copy = new PDimension(src); assertEquals(100, copy.getWidth(), 0.00001); assertEquals(50, copy.getHeight(), 0.00001); }
public void testDimensionGetBuiltFromPoints() { final PDimension dimension = new PDimension(new Point2D.Double(-50, -25), new Point2D.Double(50, 25)); assertEquals(100, dimension.getWidth(), 0.00001); assertEquals(50, dimension.getHeight(), 0.00001); }
public void testDefaultConstructorResultsInEmptyDimension() { final PDimension dimension = new PDimension(); assertEquals(0, dimension.getWidth(), 0.00001); assertEquals(0, dimension.getHeight(), 0.00001); }