assertEquals(4, ell.getNbPoints());
}
@Test
public void testConstructors3() {
IEllipse ell;
try {
ell = ShapeFactory.createEllipse(null, ShapeFactory.createPoint());
fail();
}catch(IllegalArgumentException ex) { /* */ }
try {
ell = ShapeFactory.createEllipse(ShapeFactory.createPoint(), null);
fail();
}catch(IllegalArgumentException ex) { /* */ }
try {
ell = ShapeFactory.createEllipse(ShapeFactory.createPoint(), ShapeFactory.createPoint());
fail();
}catch(IllegalArgumentException ex) { /* */ }
try {
ell = ShapeFactory.createEllipse(ShapeFactory.createPoint(1,0), ShapeFactory.createPoint(2,0));
fail();
}catch(IllegalArgumentException ex) { /* */ }
try {
ell = ShapeFactory.createEllipse(ShapeFactory.createPoint(1,Double.NaN), ShapeFactory.createPoint(2,0));
fail();
}catch(IllegalArgumentException ex) { /* */ }
try {
ell = ShapeFactory.createEllipse(ShapeFactory.createPoint(1,2), ShapeFactory.createPoint(2,Double.NaN));
fail();
}catch(IllegalArgumentException ex) { /* */ }
ell = ShapeFactory.createEllipse(ShapeFactory.createPoint(20, 26), ShapeFactory.createPoint(30, 35));
HelperTest.assertEqualsDouble(20., ell.getPosition().getX());
HelperTest.assertEqualsDouble(35., ell.getPosition().getY());
HelperTest.assertEqualsDouble(10., ell.getWidth());
HelperTest.assertEqualsDouble(9., ell.getHeight());
}