use of org.bboxdb.storage.entity.CellGrid in project bboxdb by jnidzwetzki.
the class TestCellGrid method testEmptyGrid.
/**
* Test the empty grid
*/
@Test(expected = IllegalArgumentException.class)
public void testEmptyGrid() {
final CellGrid cellGrid = CellGrid.buildWithFixedAmountOfCells(new BoundingBox(1.0, 1.0, 1.0, 1.0), 10);
final BoundingBox fullBox = BoundingBox.createFullCoveringDimensionBoundingBox(2);
cellGrid.getAllInersectedBoundingBoxes(fullBox);
}
use of org.bboxdb.storage.entity.CellGrid in project bboxdb by jnidzwetzki.
the class TestCellGrid method testWrongDimension.
/**
* Test the wrong dimension
*/
@Test(expected = RuntimeException.class)
public void testWrongDimension() {
final CellGrid cellGrid = CellGrid.buildWithFixedAmountOfCells(new BoundingBox(1.0, 1.0, 1.0, 1.0), 1);
cellGrid.getAllInersectedBoundingBoxes(new BoundingBox(1.0, 1.0));
}
use of org.bboxdb.storage.entity.CellGrid in project bboxdb by jnidzwetzki.
the class TestCellGrid method testHashCodeAndEquals.
/**
* Hashcode
*/
@Test(timeout = 60000)
public void testHashCodeAndEquals() {
final CellGrid cellGrid2D1 = CellGrid.buildWithFixedAmountOfCells(new BoundingBox(0.0, 10.0, 0.0, 10.0), 10);
final CellGrid cellGrid2D2 = CellGrid.buildWithFixedAmountOfCells(new BoundingBox(0.0, 10.0, 0.0, 10.0), 10);
Assert.assertEquals(cellGrid2D1, cellGrid2D2);
Assert.assertEquals(cellGrid2D1.hashCode(), cellGrid2D2.hashCode());
}
Aggregations