Search in sources :

Example 1 with ViewRefDefinitionImpl

use of org.kie.workbench.common.stunner.svg.gen.model.impl.ViewRefDefinitionImpl in project kie-wb-common by kiegroup.

the class SVGViewDefinitionGeneratorTest method testCheckReferencesExist.

@Test(expected = RuntimeException.class)
public void testCheckReferencesExist() throws Exception {
    final ViewFactory viewFactory = new ViewFactoryImpl("view1", "org.kie.test", "MyType.¢lass");
    final RectDefinition mainDef = new RectDefinition("rect1", 1, 2, 0);
    final CircleDefinition circleDefinition = new CircleDefinition("circle1", 25);
    final ViewDefinitionImpl viewDefinition = new ViewDefinitionImpl(ID, X, Y, WIDTH, HEIGHT, styleSheetDefinition, new ViewBoxDefinitionImpl(VBOX_MIN_X, VBOX_MIN_Y, VBOX_WIDTH, VBOX_HEIGHT), null, mainDef, circleDefinition);
    viewDefinition.setFactoryMethodName("svgViewTest");
    viewDefinition.setPath("svg-view-test.svg");
    final ViewRefDefinition refDefinition = new ViewRefDefinitionImpl("#circle1", "rect1", "circle1", "circle1");
    viewDefinition.getSVGViewRefs().add(refDefinition);
    tested.generate(viewFactory, viewDefinition).toString();
}
Also used : CircleDefinition(org.kie.workbench.common.stunner.svg.gen.model.impl.CircleDefinition) ViewRefDefinitionImpl(org.kie.workbench.common.stunner.svg.gen.model.impl.ViewRefDefinitionImpl) ViewDefinitionImpl(org.kie.workbench.common.stunner.svg.gen.model.impl.ViewDefinitionImpl) ViewFactoryImpl(org.kie.workbench.common.stunner.svg.gen.model.impl.ViewFactoryImpl) ViewFactory(org.kie.workbench.common.stunner.svg.gen.model.ViewFactory) ViewRefDefinition(org.kie.workbench.common.stunner.svg.gen.model.ViewRefDefinition) ViewBoxDefinitionImpl(org.kie.workbench.common.stunner.svg.gen.model.impl.ViewBoxDefinitionImpl) RectDefinition(org.kie.workbench.common.stunner.svg.gen.model.impl.RectDefinition) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 ViewFactory (org.kie.workbench.common.stunner.svg.gen.model.ViewFactory)1 ViewRefDefinition (org.kie.workbench.common.stunner.svg.gen.model.ViewRefDefinition)1 CircleDefinition (org.kie.workbench.common.stunner.svg.gen.model.impl.CircleDefinition)1 RectDefinition (org.kie.workbench.common.stunner.svg.gen.model.impl.RectDefinition)1 ViewBoxDefinitionImpl (org.kie.workbench.common.stunner.svg.gen.model.impl.ViewBoxDefinitionImpl)1 ViewDefinitionImpl (org.kie.workbench.common.stunner.svg.gen.model.impl.ViewDefinitionImpl)1 ViewFactoryImpl (org.kie.workbench.common.stunner.svg.gen.model.impl.ViewFactoryImpl)1 ViewRefDefinitionImpl (org.kie.workbench.common.stunner.svg.gen.model.impl.ViewRefDefinitionImpl)1