Exemple #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());
 }
Exemple #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());
 }
Exemple #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());
 }
Exemple #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);
 }
Exemple #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);
 }
Exemple #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());
 }