Package org.drools.guvnor.client.rpc

Examples of org.drools.guvnor.client.rpc.IFramePerspectiveConfiguration


    @Test
    public void testLoad() throws Exception {
        setUpMockIdentity();
        String uuid = save("Runtime", "http://jboss.com/brms");

        IFramePerspectiveConfiguration configuration = configurationService.load(uuid);

        verify(rulesRepository).loadPerspectivesConfiguration(uuid);

        assertEquals(uuid, configuration.getUuid());
        assertEquals("Runtime", configuration.getName());
        assertEquals("http://jboss.com/brms", configuration.getUrl());
    }
View Full Code Here


    @Test
    public void testModify() throws Exception {
        setUpMockIdentity();
        String uuid = save("oldName", "http://jboss.org/oldUrl");

        IFramePerspectiveConfiguration configuration = configurationService.load(uuid);
        configuration.setName("newName");
        configuration.setUrl("http://jboss.org/guvnor");

        String saveUuid = configurationService.save(configuration);

        verify(rulesRepository, never()).createPerspectivesConfiguration("newName", "http://jboss.org/guvnor");
View Full Code Here

        assertNotNull(preferences);
    }

    private String save(String name, String url) {
        IFramePerspectiveConfiguration configuration = new IFramePerspectiveConfiguration();
        configuration.setName(name);
        configuration.setUrl(url);

        return configurationService.save(configuration);
    }
View Full Code Here

        verify( loadPerspectives ).loadPerspectives( Matchers.<Collection<Perspective>> anyObject() );
    }

    private void setUpPerspectiveConfiguration(String name) {
        IFramePerspectiveConfiguration perspectivesConfiguration = new IFramePerspectiveConfiguration();
        perspectivesConfiguration.setName( name );
        result.add( perspectivesConfiguration );
    }
View Full Code Here

        presenter.onRemovePerspective();
    }

    private void userFillsTheFieldsWithTheFollowingValuesAndClicksSaveInThePopUp(String name,
                                                                                 String url) {
        IFramePerspectiveConfiguration configurationBeingEdited = getConfigurationBeingEdited();
        SaveCommand<IFramePerspectiveConfiguration> saveCommand = (SaveCommand<IFramePerspectiveConfiguration>) saveCommandCaptor.getValue();
        if ( areWeCreatingANewConfiguration( configurationBeingEdited ) ) {
            saveCommand.save( getConfiguration( null,
                                                name,
                                                url ) );
        } else {
            saveCommand.save( getConfiguration( configurationBeingEdited.getUuid(),
                                                name,
                                                url ) );
        }
    }
View Full Code Here

    }

    private IFramePerspectiveConfiguration getConfiguration(String uuid,
                                                            String name,
                                                            String url) {
        IFramePerspectiveConfiguration iFramePerspectiveConfiguration = new IFramePerspectiveConfiguration();
        iFramePerspectiveConfiguration.setUuid( uuid );
        iFramePerspectiveConfiguration.setName( name );
        iFramePerspectiveConfiguration.setUrl( url );
        return iFramePerspectiveConfiguration;
    }
View Full Code Here

        }
    }

    private IFramePerspectiveConfiguration configurationItemToConfiguration(IFramePerspectiveConfigurationItem perspectiveConfigurationItem) {
        IFramePerspectiveConfiguration configuration = new IFramePerspectiveConfiguration();
        configuration.setUuid(perspectiveConfigurationItem.getUuid());
        configuration.setName(perspectiveConfigurationItem.getName());
        configuration.setUrl(perspectiveConfigurationItem.getUrl());
        return configuration;
    }
View Full Code Here

TOP

Related Classes of org.drools.guvnor.client.rpc.IFramePerspectiveConfiguration

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.