@Test public void testAccept() throws Exception { OpendapLeaf opendapLeafFullyInside = createLeaf(45.0, -8.0, -68.0, 19.0); OpendapLeaf opendapLeafGoingHorizontallyThroughBox = createLeaf(89.0, -1.0, -89.0, 1.0); OpendapLeaf opendapLeafGoingVerticallyThroughBox = createLeaf(45.0, -179.0, -68.0, 179.0); OpendapLeaf opendapLeafContainingOneEdge = createLeaf(55.0, -12.0, 45.0, -8.0); OpendapLeaf opendapLeafWholeWorld = createLeaf(90.0, -180.0, -90.0, 180.0); OpendapLeaf opendapLeafAbove = createLeaf(90.0, -180.0, 80.0, 180.0); OpendapLeaf opendapLeafRight = createLeaf(90, 30.0, -90.0, 180.0); OpendapLeaf opendapLeafBelow = createLeaf(-80.0, -180, -90.0, 180.0); OpendapLeaf opendapLeafLeft = createLeaf(90.0, -180, -90.0, -11.0); assertTrue(regionFilter.accept(opendapLeafFullyInside)); assertTrue(regionFilter.accept(opendapLeafGoingHorizontallyThroughBox)); assertTrue(regionFilter.accept(opendapLeafGoingVerticallyThroughBox)); assertTrue(regionFilter.accept(opendapLeafContainingOneEdge)); assertTrue(regionFilter.accept(opendapLeafWholeWorld)); assertFalse(regionFilter.accept(opendapLeafAbove)); assertFalse(regionFilter.accept(opendapLeafRight)); assertFalse(regionFilter.accept(opendapLeafBelow)); assertFalse(regionFilter.accept(opendapLeafLeft)); }