package test.models;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import net.sf.latexdraw.models.ShapeFactory;
import net.sf.latexdraw.models.interfaces.shape.ICircle;
import net.sf.latexdraw.models.interfaces.shape.IFreehand;
import net.sf.latexdraw.models.interfaces.shape.IModifiablePointsShape;
import net.sf.latexdraw.models.interfaces.shape.IRectangle;
import net.sf.latexdraw.models.interfaces.shape.IShape;
import org.junit.Before;
import org.junit.Test;
import test.models.interfaces.TestIFreehand;
public class TestLFreeHand extends TestIFreehand<IFreehand> {
@Before
public void setUp() {
shape = ShapeFactory.INST.createFreeHand();
shape2 = ShapeFactory.INST.createFreeHand();
}
@Override
@Test
public void testIsTypeOf() {
assertFalse(shape.isTypeOf(null));
assertFalse(shape.isTypeOf(IRectangle.class));
assertFalse(shape.isTypeOf(ICircle.class));
assertTrue(shape.isTypeOf(IShape.class));
assertTrue(shape.isTypeOf(IModifiablePointsShape.class));
assertTrue(shape.isTypeOf(IFreehand.class));
assertTrue(shape.isTypeOf(shape.getClass()));
}
@Test
public void testConstructors() {
final IFreehand fh = ShapeFactory.INST.createFreeHand();
assertNotNull(fh);
}
}