use of org.kie.workbench.common.stunner.core.client.canvas.controls.actions.DefaultTextPropertyProviderImpl in project kie-wb-common by kiegroup.
the class TextEditorBoxImplTest method init.
@Before
@SuppressWarnings("unchecked")
public void init() {
this.textPropertyProvider = new DefaultTextPropertyProviderImpl(definitionUtils, canvasCommandFactory);
when(element.getContent()).thenReturn(definition);
when(definition.getDefinition()).thenReturn(objectDefinition);
when(definitionUtils.getName(objectDefinition)).thenReturn(NAME);
when(definitionUtils.getNameIdentifier(objectDefinition)).thenReturn(ID);
when(commandProvider.getCommandManager()).thenReturn(canvasCommandManager);
when(canvasHandler.getTextPropertyProviderFactory()).thenReturn(textPropertyProviderFactory);
when(textPropertyProviderFactory.getProvider(any(Element.class))).thenReturn(textPropertyProvider);
presenter = new TextEditorBoxImpl(view);
presenter.setup();
verify(view).init(presenter);
presenter.initialize(canvasHandler, closeCallback);
presenter.setCommandManagerProvider(commandProvider);
presenter.getElement();
verify(view).getElement();
presenter.show(element);
verify(view).show(NAME);
}
Aggregations