use of org.kie.workbench.common.stunner.core.client.components.palette.CollapsedPaletteDefinitionBuilder in project kie-wb-common by kiegroup.
the class DMNPaletteDefinitionBuilderTest method setup.
@Before
@SuppressWarnings("unchecked")
public void setup() {
collapsedPaletteBuilder = spy(new CollapsedPaletteDefinitionBuilder(definitionUtils, clientFactoryServices, translationService));
doAnswer(new Answer() {
@Override
public Object answer(InvocationOnMock invocationOnMock) throws Throwable {
Consumer<DefaultPaletteDefinition> c = (Consumer<DefaultPaletteDefinition>) invocationOnMock.getArguments()[1];
c.accept(paletteDefinition);
return null;
}
}).when(collapsedPaletteBuilder).build(eq(canvasHandler), any(Consumer.class));
tested = new DMNPaletteDefinitionBuilder(collapsedPaletteBuilder);
tested.init();
}
Aggregations