Search in sources :

Example 1 with StringListProperty

use of org.mapstruct.ap.test.builtin.bean.StringListProperty in project mapstruct by mapstruct.

the class BuiltInTest method shouldApplyBuiltInOnJAXBElementList.

@ProcessorTest
@WithClasses({ JaxbListMapper.class, JaxbElementListProperty.class })
@WithJavaxJaxb
@IssueKey("141")
public void shouldApplyBuiltInOnJAXBElementList() {
    JaxbElementListProperty source = new JaxbElementListProperty();
    source.setProp(createJaxbList("TEST2"));
    source.publicProp = createJaxbList("PUBLIC TEST2");
    StringListProperty target = JaxbListMapper.INSTANCE.map(source);
    assertThat(target).isNotNull();
    assertThat(target.getProp().get(0)).isEqualTo("TEST2");
    assertThat(target.publicProp.get(0)).isEqualTo("PUBLIC TEST2");
}
Also used : StringListProperty(org.mapstruct.ap.test.builtin.bean.StringListProperty) JaxbElementListProperty(org.mapstruct.ap.test.builtin.bean.JaxbElementListProperty) WithJavaxJaxb(org.mapstruct.ap.testutil.WithJavaxJaxb) IssueKey(org.mapstruct.ap.testutil.IssueKey) ProcessorTest(org.mapstruct.ap.testutil.ProcessorTest) WithClasses(org.mapstruct.ap.testutil.WithClasses)

Aggregations

JaxbElementListProperty (org.mapstruct.ap.test.builtin.bean.JaxbElementListProperty)1 StringListProperty (org.mapstruct.ap.test.builtin.bean.StringListProperty)1 IssueKey (org.mapstruct.ap.testutil.IssueKey)1 ProcessorTest (org.mapstruct.ap.testutil.ProcessorTest)1 WithClasses (org.mapstruct.ap.testutil.WithClasses)1 WithJavaxJaxb (org.mapstruct.ap.testutil.WithJavaxJaxb)1