120121122123124125126127128129130
} public void testEnclosingUnion() { final Bounds c = new Bounds(10, 20, 5, 5); final Bounds u = new Bounds(b); u.union(c); assertEquals(b, u); } public void testExplicitBounds() { assertEquals(5, b.getX());
197198199200201202203204205206207
} public void testNonOverlappingUnion() { final Bounds c = new Bounds(20, 40, 10, 20); final Bounds u = new Bounds(b); u.union(c); assertEquals(new Bounds(5, 10, 25, 50), u); } public void testOverlappingIntersects() { Bounds c = new Bounds(b);
216217218219220221222223224225226
} public void testOverlappingUnion() { final Bounds c = new Bounds(3, 5, 10, 10); final Bounds u = new Bounds(b); u.union(c); assertEquals(new Bounds(3, 5, 12, 25), u); } public void testTranslate() { b.translate(10, 5);
123124125126127128129130131132133
200201202203204205206207208209210
219220221222223224225226227228229
122123124125126127128129130131132
199200201202203204205206207208209
218219220221222223224225226227228