Examples of BeanDescription


Examples of org.openengsb.core.api.model.BeanDescription

        MethodCall methodCall = new MethodCall("delete", new Object[]{ connectorId });
        Map<String, String> metaData = new HashMap<String, String>();
        metaData.put("serviceId", "connectorManager");
        methodCall.setMetaData(metaData);
        MethodCallMessage methodCallRequest = new MethodCallMessage(methodCall, false);
        BeanDescription auth = BeanDescription.fromObject(new Password("password"));
        methodCallRequest.setPrincipal("admin");
        methodCallRequest.setCredentials(auth);
        ObjectMapper mapper = new ObjectMapper();
        String writeValueAsString = mapper.writerWithDefaultPrettyPrinter().writeValueAsString(methodCallRequest);
        System.out.println(writeValueAsString);
View Full Code Here

Examples of org.openengsb.core.api.model.BeanDescription

            "tcp://127.0.0.1:%s?example-remote" });
        Map<String, String> metaData = new HashMap<String, String>();
        metaData.put("serviceId", "connectorManager");
        methodCall.setMetaData(metaData);
        MethodCallMessage methodCallRequest = new MethodCallMessage(methodCall, false);
        BeanDescription auth = BeanDescription.fromObject(new Password("password"));
        methodCallRequest.setPrincipal("admin");
        methodCallRequest.setCredentials(auth);

        ObjectMapper mapper = new ObjectMapper();
        String writeValueAsString = mapper.writerWithDefaultPrettyPrinter().writeValueAsString(methodCallRequest);
View Full Code Here

Examples of org.openengsb.core.api.model.BeanDescription

public class BeanDescriptionTest {

    @Test
    public void testWrapSimpleBean_shouldContainStringData() throws Exception {
        SimpleTestBean bean = new SimpleTestBean("42", 42L);
        BeanDescription beanDescription = BeanDescription.fromObject(bean);
        assertThat(beanDescription.getData().get("stringValue"), is("42"));
        assertThat(beanDescription.getData().get("longValue"), is("42"));
    }
View Full Code Here

Examples of org.openengsb.core.api.model.BeanDescription

    }

    @Test
    public void testWrapAndUnWrapSimpleBean_shouldBeEqualObject() throws Exception {
        SimpleTestBean bean = new SimpleTestBean("42", 42L);
        BeanDescription beanDescription = BeanDescription.fromObject(bean);
        SimpleTestBean bean2 = beanDescription.toObject(SimpleTestBean.class);

        assertThat(bean2.getLongValue(), is(42L));
        assertThat(bean2.getStringValue(), is("42"));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.