Package org.openengsb.ui.admin.connectorEditorPage

Examples of org.openengsb.ui.admin.connectorEditorPage.ConnectorEditorPage$ConnectorServiceEditor


            .add(new PaxWicketSpringBeanComponentInjector(tester.getApplication(), context));
    }

    @Test
    public void testAttributesWithDefaultValues_shouldInitializeModelWithDefaults() throws Exception {
        tester.startPage(new ConnectorEditorPage("testdomain", "testconnector"));
        RepeatingView list =
            (RepeatingView) tester.getComponentFromLastRenderedPage("editor:form:attributesPanel:fields");
        @SuppressWarnings("unchecked")
        TextField<String> component = (TextField<String>) list.get("a:row:field");
        assertThat(component.getModelObject(), is("a_default"));
View Full Code Here


        assertThat(value.getValue(), is("testValue"));
    }

    @Test
    public void testAddProperty_shouldAddProperty() throws Exception {
        tester.startPage(new ConnectorEditorPage("testdomain", "testconnector"));
        AjaxButton button = (AjaxButton) tester.getComponentFromLastRenderedPage("editor:form:addProperty");
        FormTester newFormTester = tester.newFormTester("editor:form");
        newFormTester.setValue("newPropertyKey", "testNew");
        tester.executeAjaxEvent(button, "onclick");
        Label propertyLabel =
View Full Code Here

        assertThat(propertyLabel.getDefaultModelObjectAsString(), is("testNew"));
    }

    @Test
    public void testCreateService_shouldAddService() throws Exception {
        tester.startPage(new ConnectorEditorPage("testdomain", "testconnector"));
        FormTester newFormTester = tester.newFormTester("editor:form");
        tester.debugComponentTrees();
        newFormTester.submit("submitButton");
        tester.executeAjaxEvent("editor:form:submitButton", "onclick");
        Map<String, String> ref = new HashMap<String, String>();
View Full Code Here

        serviceUtils.getService(NullDomain.class, 100L);
    }
   
    @Test
    public void testCancelButton_shouldWork() throws Exception {
        tester.startPage(new ConnectorEditorPage("testdomain", "testconnector"));
        FormTester newFormTester = tester.newFormTester("editor:form");
        tester.debugComponentTrees();
        newFormTester.submit("cancelButton");
        tester.executeAjaxEvent("editor:form:cancelButton", "onclick");
        tester.assertRenderedPage(TestClient.class);
View Full Code Here

        tester.assertRenderedPage(TestClient.class);
    }

    @Test
    public void testCreateServiceProperties_shouldRegisterWithProperties() throws Exception {
        tester.startPage(new ConnectorEditorPage("testdomain", "testconnector"));
        FormTester newFormTester = tester.newFormTester("editor:form");
        AjaxButton button = (AjaxButton) tester.getComponentFromLastRenderedPage("editor:form:addProperty");
        newFormTester.setValue("newPropertyKey", "testNew");
        tester.executeAjaxEvent(button, "onclick");
        tester.debugComponentTrees();
View Full Code Here

        serviceUtils.getService("(testNew=foo)", 100L);
    }

    @Test
    public void testCreateServicePropertiesLeaveFieldEmpty_shouldAddServiceProperty() throws Exception {
        tester.startPage(new ConnectorEditorPage("testdomain", "testconnector"));
        FormTester newFormTester = tester.newFormTester("editor:form");
        AjaxButton button = (AjaxButton) tester.getComponentFromLastRenderedPage("editor:form:addProperty");
        newFormTester.setValue("newPropertyKey", "testNew");
        tester.executeAjaxEvent(button, "onclick");
        tester.debugComponentTrees();
View Full Code Here

            serviceUtils.getService("(test=val)", 100L);
        } catch (OsgiServiceNotAvailableException e) {
            fail("something is wrong, the servicemanager does not work properly");
        }

        tester.startPage(new ConnectorEditorPage(id));
        FormTester newFormTester = tester.newFormTester("editor:form");

        AjaxButton button = (AjaxButton) tester.getComponentFromLastRenderedPage("editor:form:addProperty");
        newFormTester.setValue("newPropertyKey", "newKey");
        tester.executeAjaxEvent(button, "onclick");
View Full Code Here

    public void testAddServiceManagerValidationError_shouldPutErrorMessagesOnPage() throws Exception {
        Map<String, String> errorMessages = new HashMap<String, String>();
        errorMessages.put("a", "Service Validation Error");
        when(factoryMock.getValidationErrors(anyMap())).thenReturn(errorMessages);

        tester.startPage(new ConnectorEditorPage("testdomain", "testconnector"));
        FormTester formTester = tester.newFormTester("editor:form");
        formTester.setValue("attributesPanel:fields:a:row:field", "someValue");
        AjaxButton submitButton =
            (AjaxButton) tester.getComponentFromLastRenderedPage("editor:form:submitButton");
        tester.executeAjaxEvent(submitButton, "onclick");
View Full Code Here

    public void testUncheckValidationCheckbox_shouldBypassValidation() throws Exception {
        Map<String, String> errorMessages = new HashMap<String, String>();
        errorMessages.put("a", "Service Validation Error");
        when(factoryMock.getValidationErrors(anyMap())).thenReturn(errorMessages);

        tester.startPage(new ConnectorEditorPage("testdomain", "testconnector"));
        FormTester formTester = tester.newFormTester("editor:form");
        formTester.setValue("attributesPanel:fields:a:row:field", "someValue");
        tester.debugComponentTrees();
        formTester.setValue("attributesPanel:validate", false);
        AjaxButton submitButton =
View Full Code Here

        serviceUtils.getService(NullDomain.class, 100L);
    }

    @Test
    public void testMultiValueServiceProperties_shouldAddFields() throws Exception {
        tester.startPage(new ConnectorEditorPage("testdomain", "testconnector"));
        FormTester newFormTester = tester.newFormTester("editor:form");
        AjaxButton button = (AjaxButton) tester.getComponentFromLastRenderedPage("editor:form:addProperty");
        newFormTester.setValue("newPropertyKey", "testNew");
        tester.executeAjaxEvent(button, "onclick");
        tester.executeAjaxEvent("editor:form:attributesPanel:properties:0:values:1:value:label", "onclick");
View Full Code Here

TOP

Related Classes of org.openengsb.ui.admin.connectorEditorPage.ConnectorEditorPage$ConnectorServiceEditor

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.