示例#1
0
 /**
  * Checks the correct reading of a POI's color.
  *
  * @throws IOException
  */
 @Test
 public void testPOIColor() throws IOException {
   Repository<POI> poiRepo = conn.getPOIRepository();
   POI poi = poiRepo.getByID("0");
   Color c = new Color(255, 128, 0);
   assertEquals(c, poi.getColor());
 }
示例#2
0
 /**
  * Checks the correct setting of a POI's color.
  *
  * @throws IOException
  */
 @Test
 public void testSetPOIColor() throws IOException {
   Repository<POI> poiRepo = conn.getPOIRepository();
   POI poi = poiRepo.getByID("0");
   final Color newColor = Color.cyan;
   poi.changeColor(newColor);
   assertEquals(newColor, poi.getColor());
 }
示例#3
0
 /**
  * Checks the correct setting of a POI's type.
  *
  * @throws IOException
  */
 @Test
 public void testSetPOIType() throws IOException {
   Repository<POI> poiRepo = conn.getPOIRepository();
   POI poi = poiRepo.getByID("0");
   final String newType = "NEW_TYPE";
   poi.changeType(newType);
   assertEquals(newType, poi.getType());
 }
示例#4
0
 /**
  * Checks the correct reading of a POI's position.
  *
  * @throws IOException
  */
 @Test
 public void testPOIPosition() throws IOException {
   Repository<POI> poiRepo = conn.getPOIRepository();
   POI poi = poiRepo.getByID("0");
   Point2D pos = new Point2D.Double(100, 50);
   Point2D poiPos = poi.getPosition();
   assertEquals(pos.getX(), poiPos.getX(), DELTA);
   assertEquals(pos.getY(), poiPos.getY(), DELTA);
 }
示例#5
0
 /**
  * Checks the correct setting of a POI's position.
  *
  * @throws IOException
  */
 @Test
 public void testSetPOIPosition() throws IOException {
   Repository<POI> poiRepo = conn.getPOIRepository();
   POI poi = poiRepo.getByID("0");
   final Point2D newPos = new Point2D.Double(0, 0);
   poi.changePosition(newPos);
   final Point2D pos = poi.getPosition();
   assertEquals(newPos.getX(), pos.getX(), DELTA);
   assertEquals(newPos.getY(), pos.getY(), DELTA);
 }
示例#6
0
 /**
  * Checks the correct reading of a POI's type.
  *
  * @throws IOException
  */
 @Test
 public void testPOIType() throws IOException {
   Repository<POI> poiRepo = conn.getPOIRepository();
   POI poi = poiRepo.getByID("0");
   assertEquals("TEST_TYPE", poi.getType());
 }