package test.models; import static org.junit.Assert.assertFalse; 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.IPicture; import net.sf.latexdraw.models.interfaces.shape.IPositionShape; 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.TestIPicture; public class TestLPicture extends TestIPicture<IPicture> { @Before public void setUp() { shape = ShapeFactory.INST.createPicture(ShapeFactory.INST.createPoint()); shape2 = ShapeFactory.INST.createPicture(ShapeFactory.INST.createPoint()); } @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(IPositionShape.class)); assertTrue(shape.isTypeOf(IPicture.class)); assertTrue(shape.isTypeOf(shape.getClass())); } }