Search in sources :

Example 1 with NewJavaFileTextHandler

use of org.kie.workbench.common.screens.datamodeller.client.handlers.NewJavaFileTextHandler in project kie-wb-common by kiegroup.

the class AddAssetScreenTest method testOnOpen.

@Test
public void testOnOpen() {
    NewResourceHandler rh1 = new NewFileUploader();
    NewResourceHandler rh2 = new NewJavaFileTextHandler();
    doReturn(Arrays.asList(rh1, rh2)).when(resourceHandlerManager).getNewResourceHandlers();
    addAssetScreen.initialize();
    addAssetScreen.onOpen();
    assertEquals(1, addAssetScreen.newResourceHandlers.size());
    assertEquals(rh2, addAssetScreen.newResourceHandlers.get(0));
}
Also used : NewResourceHandler(org.kie.workbench.common.widgets.client.handlers.NewResourceHandler) NewFileUploader(org.kie.workbench.common.screens.defaulteditor.client.editor.NewFileUploader) NewJavaFileTextHandler(org.kie.workbench.common.screens.datamodeller.client.handlers.NewJavaFileTextHandler) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 NewJavaFileTextHandler (org.kie.workbench.common.screens.datamodeller.client.handlers.NewJavaFileTextHandler)1 NewFileUploader (org.kie.workbench.common.screens.defaulteditor.client.editor.NewFileUploader)1 NewResourceHandler (org.kie.workbench.common.widgets.client.handlers.NewResourceHandler)1