Search in sources :

Example 1 with AttributeTestBean

use of org.apache.cxf.javascript.fortest.AttributeTestBean in project cxf by apache.

the class AttributeTest method testDeserialization.

@Test
public void testDeserialization() throws Exception {
    setupClientAndRhino("attribute-test-proxy-factory");
    testUtilities.readResourceIntoRhino("/attributeTests.js");
    DataBinding dataBinding = new JAXBDataBinding(AttributeTestBean.class);
    assertNotNull(dataBinding);
    AttributeTestBean bean = new AttributeTestBean();
    bean.element1 = "e1";
    bean.element2 = "e2";
    bean.attribute1 = "a1";
    bean.attribute2 = "a2";
    String serialized = serializeObject(dataBinding, bean);
    testUtilities.rhinoCallInContext("deserializeAttributeTestBean", serialized);
}
Also used : AttributeTestBean(org.apache.cxf.javascript.fortest.AttributeTestBean) DataBinding(org.apache.cxf.databinding.DataBinding) JAXBDataBinding(org.apache.cxf.jaxb.JAXBDataBinding) JAXBDataBinding(org.apache.cxf.jaxb.JAXBDataBinding) AbstractCXFSpringTest(org.apache.cxf.test.AbstractCXFSpringTest) Test(org.junit.Test)

Aggregations

DataBinding (org.apache.cxf.databinding.DataBinding)1 AttributeTestBean (org.apache.cxf.javascript.fortest.AttributeTestBean)1 JAXBDataBinding (org.apache.cxf.jaxb.JAXBDataBinding)1 AbstractCXFSpringTest (org.apache.cxf.test.AbstractCXFSpringTest)1 Test (org.junit.Test)1