Package org.openengsb.domain.example.model

Examples of org.openengsb.domain.example.model.ExampleResponseModel


    }

    @Override
    public ExampleResponseModel doSomethingWithModel(ExampleRequestModel model) {
        LOGGER.info("RequestModelEvent: {}", model);
        ExampleResponseModel response = new ExampleResponseModel();
        response.setResult("success");
        return response;
    }
View Full Code Here


        }

        @Override
        public ExampleResponseModel doSomethingWithModel(ExampleRequestModel model) {
            wasCalled = true;
            return new ExampleResponseModel();
        }
View Full Code Here

    @Test
    public void testSendMethodWithModelIncludingTailAsParamter_shouldWork() throws Exception {
        registerDummyService();
        EncryptedAnswer answer = sendMessage(METHOD_CALL_WITH_MODEL_INCLUDING_TAIL_PARAMETER);
        String decryptedResult = decryptResult(answer.getSessionKey(), answer.getAnswer());
        ExampleResponseModel model = extractResponseModelFromMethodResult(decryptedResult);
        assertThat(decryptedResult.contains("successful with tail"), is(true));
        assertThat(model.getResult(), is("successful with tail"));
    }
View Full Code Here

            throw new UnsupportedOperationException("Not yet implemented");
        }

        @Override
        public ExampleResponseModel doSomethingWithModel(ExampleRequestModel model) {
            ExampleResponseModel response = new ExampleResponseModel();
            response.setResult("successful");
            for (OpenEngSBModelEntry entry : ModelWrapper.wrap(model).getOpenEngSBModelTail()) {
                if (entry.getKey().equals("specialKey") && entry.getValue().equals("specialValue")) {
                    response.setResult("successful with tail");
                }
            }
            return response;
        }
View Full Code Here

        }

        @Override
        public ExampleResponseModel doSomethingWithModel(ExampleRequestModel model) {
            wasCalled = true;
            return new ExampleResponseModel();
        }
View Full Code Here

    }

    @Override
    public ExampleResponseModel doSomethingWithModel(ExampleRequestModel model) {
        LOGGER.info("RequestModelEvent: {}", model);
        ExampleResponseModel response = new ExampleResponseModel();
        response.setResult("success");
        return response;
    }
View Full Code Here

        ExampleRequestModel modelA = new ExampleRequestModel();
        modelA.setName("test");
        modelA.setId(42);

        ExampleResponseModel modelB = transformRequestToResponse(modelA);

        assertThat(modelB.getResult(), is("test-42"));
    }
View Full Code Here

    }

    @Test
    public void testIfTransformationsFromFileWork_shouldWork() throws Exception {
        loadDescriptionsFromFile();
        ExampleResponseModel modelA = new ExampleResponseModel();
        modelA.setResult("test-42");

        ExampleRequestModel modelB = transformResponseToRequest(modelA);

        transformationEngine.deleteDescriptionsByFile("testDescription.transformation");
        assertThat(modelB.getName(), is("test"));
View Full Code Here

        TransformationDescription description =
            new TransformationDescription(getExampleResponseDescription(), getExampleRequestDescription());
        description.addStep("dummy", Arrays.asList("result"), "name", new HashMap<String, String>());
        transformationEngine.saveDescription(description);

        ExampleResponseModel modelA = new ExampleResponseModel();
        modelA.setResult("teststring");

        ExampleRequestModel modelB = transformResponseToRequest(modelA);

        assertThat(modelB.getName(), is("DUMMYteststringDUMMY"));
    }
View Full Code Here

    @Test
    public void testSendMethodWithModelAsParamter_shouldWork() throws Exception {
        registerDummyService();
        EncryptedAnswer answer = sendMessage(METHOD_CALL_WITH_MODEL_PARAMETER);
        String decryptedResult = decryptResult(answer.getSessionKey(), answer.getAnswer());
        ExampleResponseModel model = extractResponseModelFromMethodResult(decryptedResult);
        assertThat(decryptedResult.contains("successful"), is(true));
        assertThat(model.getResult(), is("successful"));
    }
View Full Code Here

TOP

Related Classes of org.openengsb.domain.example.model.ExampleResponseModel

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.