@Test @SuppressWarnings("unchecked") public void testInit() { factory.init(); verify(delegateShapeFactory).delegate(eq(DMNDiagram.class), any(DMNSVGShapeDefImpl.class), shapeDefFactoryCaptor.capture()); assertEquals(svgShapeFactory, shapeDefFactoryCaptor.getValue().get()); verify(delegateShapeFactory).delegate(eq(InputData.class), any(DMNSVGShapeDefImpl.class), shapeDefFactoryCaptor.capture()); assertEquals(svgShapeFactory, shapeDefFactoryCaptor.getValue().get()); verify(delegateShapeFactory).delegate(eq(KnowledgeSource.class), any(DMNSVGShapeDefImpl.class), shapeDefFactoryCaptor.capture()); assertEquals(svgShapeFactory, shapeDefFactoryCaptor.getValue().get()); verify(delegateShapeFactory).delegate(eq(BusinessKnowledgeModel.class), any(DMNSVGShapeDefImpl.class), shapeDefFactoryCaptor.capture()); assertEquals(svgShapeFactory, shapeDefFactoryCaptor.getValue().get()); verify(delegateShapeFactory).delegate(eq(Decision.class), any(DMNSVGShapeDefImpl.class), shapeDefFactoryCaptor.capture()); assertEquals(svgShapeFactory, shapeDefFactoryCaptor.getValue().get()); verify(delegateShapeFactory).delegate(eq(TextAnnotation.class), any(DMNSVGShapeDefImpl.class), shapeDefFactoryCaptor.capture()); assertEquals(svgShapeFactory, shapeDefFactoryCaptor.getValue().get()); verify(delegateShapeFactory).delegate(eq(Association.class), any(DMNConnectorShapeDefImpl.class), shapeDefFactoryCaptor.capture()); assertEquals(dmnConnectorShapeFactory, shapeDefFactoryCaptor.getValue().get()); verify(delegateShapeFactory).delegate(eq(AuthorityRequirement.class), any(DMNConnectorShapeDefImpl.class), shapeDefFactoryCaptor.capture()); assertEquals(dmnConnectorShapeFactory, shapeDefFactoryCaptor.getValue().get()); verify(delegateShapeFactory).delegate(eq(InformationRequirement.class), any(DMNConnectorShapeDefImpl.class), shapeDefFactoryCaptor.capture()); assertEquals(dmnConnectorShapeFactory, shapeDefFactoryCaptor.getValue().get()); verify(delegateShapeFactory).delegate(eq(KnowledgeRequirement.class), any(DMNConnectorShapeDefImpl.class), shapeDefFactoryCaptor.capture()); assertEquals(dmnConnectorShapeFactory, shapeDefFactoryCaptor.getValue().get()); verify(delegateShapeFactory).delegate(eq(DecisionService.class), any(DMNSVGShapeDefImpl.class), shapeDefFactoryCaptor.capture()); assertEquals(dmnDecisionServiceShapeFactory, shapeDefFactoryCaptor.getValue().get()); }
@PostConstruct public void init() { delegateShapeFactory .delegate(DMNDiagram.class, new DMNSVGShapeDefImpl(), () -> svgShapeFactory) .delegate(InputData.class, new DMNSVGShapeDefImpl(), () -> svgShapeFactory) .delegate(KnowledgeSource.class, new DMNSVGShapeDefImpl(), () -> svgShapeFactory) .delegate(BusinessKnowledgeModel.class, new DMNSVGShapeDefImpl(), () -> svgShapeFactory) .delegate(Decision.class, new DMNSVGShapeDefImpl(), () -> svgShapeFactory) .delegate(TextAnnotation.class, new DMNSVGShapeDefImpl(), () -> svgShapeFactory) .delegate(Association.class, new DMNConnectorShapeDefImpl(), () -> dmnConnectorShapeFactory) .delegate(AuthorityRequirement.class, new DMNConnectorShapeDefImpl(), () -> dmnConnectorShapeFactory) .delegate(InformationRequirement.class, new DMNConnectorShapeDefImpl(), () -> dmnConnectorShapeFactory) .delegate(KnowledgeRequirement.class, new DMNConnectorShapeDefImpl(), () -> dmnConnectorShapeFactory) .delegate(DecisionService.class, new DMNDecisionServiceSVGShapeDefImpl(), () -> dmnDecisionServiceShapeFactory); }
DMNShapeFactory implements ShapeFactory<DMNDefinition, Shape> { @PostConstruct public void init() { delegateShapeFactory .delegate(DMNDiagram.class, new DMNSVGShapeDefImpl(), () -> svgShapeFactory) .delegate(InputData.class, new DMNSVGShapeDefImpl(), () -> svgShapeFactory) .delegate(KnowledgeSource.class, new DMNSVGShapeDefImpl(), () -> svgShapeFactory) .delegate(BusinessKnowledgeModel.class, new DMNSVGShapeDefImpl(), () -> svgShapeFactory) .delegate(Decision.class, new DMNSVGShapeDefImpl(), () -> svgShapeFactory) .delegate(TextAnnotation.class, new DMNSVGShapeDefImpl(), () -> svgShapeFactory) .delegate(Association.class, new DMNConnectorShapeDefImpl(), () -> dmnConnectorShapeFactory) .delegate(AuthorityRequirement.class, new DMNConnectorShapeDefImpl(), () -> dmnConnectorShapeFactory) .delegate(InformationRequirement.class, new DMNConnectorShapeDefImpl(), () -> dmnConnectorShapeFactory) .delegate(KnowledgeRequirement.class, new DMNConnectorShapeDefImpl(), () -> dmnConnectorShapeFactory) .delegate(DecisionService.class, new DMNDecisionServiceSVGShapeDefImpl(), () -> dmnDecisionServiceShapeFactory); } }
DMNShapeFactory implements ShapeFactory<DMNDefinition, Shape> { @PostConstruct public void init() { delegateShapeFactory .delegate(DMNDiagram.class, new DMNSVGShapeDefImpl(), () -> svgShapeFactory) .delegate(InputData.class, new DMNSVGShapeDefImpl(), () -> svgShapeFactory) .delegate(KnowledgeSource.class, new DMNSVGShapeDefImpl(), () -> svgShapeFactory) .delegate(BusinessKnowledgeModel.class, new DMNSVGShapeDefImpl(), () -> svgShapeFactory) .delegate(Decision.class, new DMNSVGShapeDefImpl(), () -> svgShapeFactory) .delegate(TextAnnotation.class, new DMNSVGShapeDefImpl(), () -> svgShapeFactory) .delegate(Association.class, new DMNConnectorShapeDefImpl(), () -> dmnConnectorShapeFactory) .delegate(AuthorityRequirement.class, new DMNConnectorShapeDefImpl(), () -> dmnConnectorShapeFactory) .delegate(InformationRequirement.class, new DMNConnectorShapeDefImpl(), () -> dmnConnectorShapeFactory) .delegate(KnowledgeRequirement.class, new DMNConnectorShapeDefImpl(), () -> dmnConnectorShapeFactory) .delegate(DecisionService.class, new DMNDecisionServiceSVGShapeDefImpl(), () -> dmnDecisionServiceShapeFactory); } @Inject  DMNShapeFactory(final SVGShapeFactory svgShapeFactory,
                           final DMNConnectorShapeFactory dmnConnectorShapeFactory,
                           final DMNDecisionServiceShapeFactory dmnDecisionServiceShapeFactory,
                           final DelegateShapeFactory<DMNDefinition, Shape> delegateShapeFactory); }
DMNShapeFactory implements ShapeFactory<DMNDefinition, Shape> { @PostConstruct public void init() { delegateShapeFactory .delegate(DMNDiagram.class, new DMNSVGShapeDefImpl(), () -> svgShapeFactory) .delegate(InputData.class, new DMNSVGShapeDefImpl(), () -> svgShapeFactory) .delegate(KnowledgeSource.class, new DMNSVGShapeDefImpl(), () -> svgShapeFactory) .delegate(BusinessKnowledgeModel.class, new DMNSVGShapeDefImpl(), () -> svgShapeFactory) .delegate(Decision.class, new DMNSVGShapeDefImpl(), () -> svgShapeFactory) .delegate(TextAnnotation.class, new DMNSVGShapeDefImpl(), () -> svgShapeFactory) .delegate(Association.class, new DMNConnectorShapeDefImpl(), () -> dmnConnectorShapeFactory) .delegate(AuthorityRequirement.class, new DMNConnectorShapeDefImpl(), () -> dmnConnectorShapeFactory) .delegate(InformationRequirement.class, new DMNConnectorShapeDefImpl(), () -> dmnConnectorShapeFactory) .delegate(KnowledgeRequirement.class, new DMNConnectorShapeDefImpl(), () -> dmnConnectorShapeFactory) .delegate(DecisionService.class, new DMNDecisionServiceSVGShapeDefImpl(), () -> dmnDecisionServiceShapeFactory); } @Inject  DMNShapeFactory(final SVGShapeFactory svgShapeFactory,
                           final DMNConnectorShapeFactory dmnConnectorShapeFactory,
                           final DMNDecisionServiceShapeFactory dmnDecisionServiceShapeFactory,
                           final DelegateShapeFactory<DMNDefinition, Shape> delegateShapeFactory); @PostConstruct void init(); @Override Shape newShape(final DMNDefinition definition); @Override Glyph getGlyph(final String definitionId); @Override Glyph getGlyph(final String definitionId,
                          final Class<? extends GlyphConsumer> consumer); }
DMNShapeFactory implements ShapeFactory<DMNDefinition, Shape> { @PostConstruct public void init() { delegateShapeFactory .delegate(DMNDiagram.class, new DMNSVGShapeDefImpl(), () -> svgShapeFactory) .delegate(InputData.class, new DMNSVGShapeDefImpl(), () -> svgShapeFactory) .delegate(KnowledgeSource.class, new DMNSVGShapeDefImpl(), () -> svgShapeFactory) .delegate(BusinessKnowledgeModel.class, new DMNSVGShapeDefImpl(), () -> svgShapeFactory) .delegate(Decision.class, new DMNSVGShapeDefImpl(), () -> svgShapeFactory) .delegate(TextAnnotation.class, new DMNSVGShapeDefImpl(), () -> svgShapeFactory) .delegate(Association.class, new DMNConnectorShapeDefImpl(), () -> dmnConnectorShapeFactory) .delegate(AuthorityRequirement.class, new DMNConnectorShapeDefImpl(), () -> dmnConnectorShapeFactory) .delegate(InformationRequirement.class, new DMNConnectorShapeDefImpl(), () -> dmnConnectorShapeFactory) .delegate(KnowledgeRequirement.class, new DMNConnectorShapeDefImpl(), () -> dmnConnectorShapeFactory) .delegate(DecisionService.class, new DMNDecisionServiceSVGShapeDefImpl(), () -> dmnDecisionServiceShapeFactory); } @Inject  DMNShapeFactory(final SVGShapeFactory svgShapeFactory,
                           final DMNConnectorShapeFactory dmnConnectorShapeFactory,
                           final DMNDecisionServiceShapeFactory dmnDecisionServiceShapeFactory,
                           final DelegateShapeFactory<DMNDefinition, Shape> delegateShapeFactory); @PostConstruct void init(); @Override Shape newShape(final DMNDefinition definition); @Override Glyph getGlyph(final String definitionId); @Override Glyph getGlyph(final String definitionId,
                          final Class<? extends GlyphConsumer> consumer);  }