* Tests initialization and methods of
* de.hpi.eworld.model.db.data.event.CircleLocation
*/
@Test
public void testCircleLocation () {
CircleLocationModel cl = new CircleLocationModel();
Point2D positionOnScreen = new Point2D.Double(3,4);
GlobalPosition centerPosition = GlobalPosition.from(positionOnScreen);
cl.setCenter(centerPosition);
Point2D circlePoint = new Point2D.Double(0, -25);
GlobalPosition circlePosition = GlobalPosition.from(circlePoint);
cl.setCirclePoint(circlePosition);
cl.setRadius(centerPosition.distanceTo(circlePosition));
Assert.assertEquals(centerPosition.getLatitude(), cl.getCenter().getLatitude());
Assert.assertEquals(centerPosition.getLongitude(), cl.getCenter().getLongitude());
Assert.assertEquals(centerPosition.getAltitude(), cl.getCenter().getAltitude());
Assert.assertEquals(circlePosition.getLatitude(), cl.getCirclePoint().getLatitude());
Assert.assertEquals(circlePosition.getLongitude(), cl.getCirclePoint().getLongitude());
Assert.assertEquals(circlePosition.getAltitude(), cl.getCirclePoint().getAltitude());
Assert.assertEquals(centerPosition.distanceTo(circlePosition), cl.getRadius());
}