Search in sources :

Example 1 with NestedBean

use of com.hubspot.rosetta.beans.NestedBean in project Rosetta by HubSpot.

the class RosettaBinderTest method itBindsNestedBeanCorrectly.

@Test
public void itBindsNestedBeanCorrectly() {
    InnerBean inner = new InnerBean();
    inner.setStringProperty("value");
    NestedBean bean = new NestedBean();
    bean.setInner(inner);
    assertThat(bind(bean)).isEqualTo(map("inner.stringProperty", "value"));
    assertThat(bindWithPrefix("prefix", bean)).isEqualTo(map("prefix.inner.stringProperty", "value"));
}
Also used : NestedBean(com.hubspot.rosetta.beans.NestedBean) InnerBean(com.hubspot.rosetta.beans.InnerBean) Test(org.junit.Test)

Aggregations

InnerBean (com.hubspot.rosetta.beans.InnerBean)1 NestedBean (com.hubspot.rosetta.beans.NestedBean)1 Test (org.junit.Test)1