Package org.drools.guvnor.client.explorer

Examples of org.drools.guvnor.client.explorer.ClientFactory


        setUpUserCapabilities( true );
        createPresenter();
    }

    private void createPresenter() {
        ClientFactory clientFactory = mock( ClientFactory.class );

        NavigationViewFactory navigationViewFactory = mock( NavigationViewFactory.class );
        when(
                clientFactory.getNavigationViewFactory()
        ).thenReturn(
                navigationViewFactory
        );

        when(
                navigationViewFactory.getModulesTreeView()
        ).thenReturn(
                view
        );

        ModulesTreeItemView knowledgeModulesTreeItemView = mock( ModulesTreeItemView.class );
        when(
                navigationViewFactory.getModulesTreeItemView()
        ).thenReturn(
                knowledgeModulesTreeItemView
        );

        PackageServiceAsync packageService = mock( PackageServiceAsync.class );
        when(
                clientFactory.getPackageService()
        ).thenReturn(
                packageService
        );

        PackagesNewAssetMenuView modulesNewAssetMenuView = mock( PackagesNewAssetMenuView.class );
View Full Code Here


     * "StandaloneEditor.html" then the StandaloneGuidedEditorManager is used to
     * render the view. If not, the default view is shown.
     */
    private void createMain() {

        ClientFactory clientFactory = GWT.create( ClientFactory.class );
        appController = new AppController( clientFactory );

        if ( Window.Location.getPath().contains( "StandaloneEditor.html" ) ) {
            RootLayoutPanel.get().add( new StandaloneEditorManager( clientFactory ).getBaseLayout() );
        } else {
View Full Code Here

    @Test
    public void testSetRootItem() throws Exception {
        treeItem = mock( IsTreeItem.class );
        view = mock( ModuleTreeItemView.class );
        ClientFactory clientFactory = mock( ClientFactory.class );

        AssetEditorFactory assetEditorFactory = mock( AssetEditorFactory.class );
        when(
                clientFactory.getAssetEditorFactory()
        ).thenReturn(
                assetEditorFactory
        );

        when(
                assetEditorFactory.getRegisteredAssetEditorFormats()
        ).thenReturn(
                new String[0]
        );

        NavigationViewFactory navigationViewFactory = mock( NavigationViewFactory.class );
        when(
                clientFactory.getNavigationViewFactory()
        ).thenReturn(
                navigationViewFactory
        );
        when(
                navigationViewFactory.getModuleTreeItemView()
View Full Code Here

        setUpUserCapabilities( true );
        createPresenter();
    }

    private void createPresenter() {
        ClientFactory clientFactory = mock( ClientFactory.class );

        NavigationViewFactory navigationViewFactory = mock( NavigationViewFactory.class );
        when(
                clientFactory.getNavigationViewFactory()
        ).thenReturn(
                navigationViewFactory
        );

        when(
                navigationViewFactory.getKnowledgeModulesTreeView()
        ).thenReturn(
                view
        );

        KnowledgeModulesTreeItemView knowledgeModulesTreeItemView = mock( KnowledgeModulesTreeItemView.class );
        when(
                navigationViewFactory.getKnowledgeModulesTreeItemView()
        ).thenReturn(
                knowledgeModulesTreeItemView
        );

        PackageServiceAsync packageService = mock( PackageServiceAsync.class );
        when(
                clientFactory.getPackageService()
        ).thenReturn(
                packageService
        );

        ModulesNewAssetMenuView modulesNewAssetMenuView = mock( ModulesNewAssetMenuView.class );
        when(
                navigationViewFactory.getModulesNewAssetMenuView()
        ).thenReturn(
                modulesNewAssetMenuView
        );

        GlobalAreaTreeItemView globalAreaTreeItemView = mock( GlobalAreaTreeItemView.class );
        when(
                navigationViewFactory.getGlobalAreaTreeItemView()
        ).thenReturn(
                globalAreaTreeItemView
        );
        EventBus eventBus = mock( EventBus.class );
        when(
                clientFactory.getEventBus()
        ).thenReturn(
                eventBus
        );

        presenter = new KnowledgeModulesTree( clientFactory );
View Full Code Here

public class RunTimePerspectiveTest {

    @Test
    public void testAllBuildersExist() throws Exception {
        ClientFactory clientFactory = mock(ClientFactory.class);
        EventBus eventBus = mock(EventBus.class);
        Collection<NavigationItemBuilder> builders = new RunTimePerspective().getBuilders(clientFactory, eventBus);

        assertEquals(4, builders.size());
        assertTrue(builders.toArray()[0] instanceof TasksNavigationItemBuilder);
View Full Code Here

    @Before
    public void setUp() throws Exception {
        view = mock(PerspectivesPanelView.class);
        NavigationViewFactory navigationViewFactory = mock(NavigationViewFactory.class);
        ClientFactory clientFactory = mock(ClientFactory.class);
        eventBus = spy(new EventBusMock());
        when(
                clientFactory.getNavigationViewFactory()
        ).thenReturn(
            navigationViewFactory
        );
        when(
            navigationViewFactory.getPerspectivesPanelView()
        ).thenReturn(
                view
        );

        PerspectiveFactory perspectiveFactory = mock(PerspectiveFactory.class);
        when(
                clientFactory.getPerspectiveFactory()
        ).thenReturn(
                perspectiveFactory
        );
       
        when(
                perspectiveFactory.getPerspective("author")
        ).thenReturn(
                new AuthorPerspective()
               
        );
       
        when(
                perspectiveFactory.getPerspective("runtime")
        ).thenReturn(
                new RunTimePerspective()
               
        );       
       
        when(
                perspectiveFactory.getRegisteredPerspectiveTypes()
        ).thenReturn(
                new String[]{"author", "runtime"}
               
        );
       
        ModuleServiceAsync packageService = mock(ModuleServiceAsync.class);
        when(
                clientFactory.getModuleService()
        ).thenReturn(
                packageService
        );
       
        perspectivesPanel = new PerspectivesPanel(clientFactory, eventBus);
View Full Code Here

     * render the view. If not, the default view is shown.
     */
    private void createMain() {
        EventBus eventBus = new SimpleEventBus();
        SuggestionCompletionCache.getInstance().setEventBus(eventBus);
        ClientFactory clientFactory = new ClientFactoryImpl(eventBus);
        appController = new AppControllerImpl(clientFactory, eventBus);

        if (Window.Location.getPath().contains("StandaloneEditor.html")) {
            RootLayoutPanel.get().add(new StandaloneEditorManager(clientFactory, eventBus).getBaseLayout());
        } else {

            RootLayoutPanel.get().add(appController.getMainPanel());
        }

        askToInstallSampleRepository();

        //Have to start the FindPlace as the last thing during the initialization, otherwise we got https://bugzilla.redhat.com/show_bug.cgi?id=790025
        clientFactory.getPlaceController().goTo(new FindPlace());
    }
View Full Code Here

     * render the view. If not, the default view is shown.
     */
    private void createMain() {
        EventBus eventBus = new SimpleEventBus();
        SuggestionCompletionCache.getInstance().setEventBus(eventBus);
        ClientFactory clientFactory = new ClientFactoryImpl(eventBus);
        appController = new AppControllerImpl(clientFactory,eventBus);

        if (Window.Location.getPath().contains("StandaloneEditor.html")) {
            RootLayoutPanel.get().add(new StandaloneEditorManager(clientFactory, eventBus).getBaseLayout());
        } else {

            RootLayoutPanel.get().add(appController.getMainPanel());
        }

        askToInstallSampleRepository();

        //Have to start the FindPlace as the last thing during the initialization, otherwise we got https://bugzilla.redhat.com/show_bug.cgi?id=790025
        clientFactory.getPlaceController().goTo(new FindPlace());
    }
View Full Code Here

     * "StandaloneEditor.html" then the StandaloneGuidedEditorManager is used to
     * render the view. If not, the default view is shown.
     */
    private void createMain() {
        EventBus eventBus = new SimpleEventBus();
        ClientFactory clientFactory = new ClientFactoryImpl(eventBus);
        appController = new AppController(clientFactory,eventBus);

        if (Window.Location.getPath().contains("StandaloneEditor.html")) {
            RootLayoutPanel.get().add(new StandaloneEditorManager(clientFactory, eventBus).getBaseLayout());
        } else {

            RootLayoutPanel.get().add(appController.getMainPanel());
        }

        askToInstallSampleRepository();
       
        //Have to start the FindPlace as the last thing during the initialization, otherwise we got https://bugzilla.redhat.com/show_bug.cgi?id=790025
        clientFactory.getPlaceController().goTo(new FindPlace());
    }
View Full Code Here

    private ModuleServiceAsync packageService;

    @Before
    public void setUp() throws Exception {
        view = mock( GlobalAreaTreeItemView.class );
        ClientFactory clientFactory = mock( ClientFactory.class );
        navigationViewFactory = mock( NavigationViewFactory.class );
        when(
                clientFactory.getNavigationViewFactory()
        ).thenReturn(
                navigationViewFactory
        );
        when(
                navigationViewFactory.getGlobalAreaTreeItemView()
        ).thenReturn(
                view
        );

        packageService = mock( ModuleServiceAsync.class );
        when(
                clientFactory.getModuleService()
        ).thenReturn(
                packageService
        );

        presenter = new GlobalAreaTreeItem( clientFactory );
View Full Code Here

TOP

Related Classes of org.drools.guvnor.client.explorer.ClientFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.