use of jp.ossc.nimbus.beans.NestedProperty in project nimbus by nimbus-org.
the class NestedPropertyTest method testParse6.
public void testParse6() throws Exception {
NestedProperty prop = new NestedProperty();
prop.parse("test.test.simple");
Test test = new Test(new Test(new Test()));
prop.setProperty(test, "hoge");
assertEquals("hoge", prop.getProperty(test));
}
use of jp.ossc.nimbus.beans.NestedProperty in project nimbus by nimbus-org.
the class NestedPropertyTest method testParse3.
public void testParse3() throws Exception {
NestedProperty prop = new NestedProperty();
prop.parse("test2.simple");
Test test = new Test(new Test());
try {
prop.getProperty(test);
fail();
} catch (NoSuchPropertyException e) {
}
}
use of jp.ossc.nimbus.beans.NestedProperty in project nimbus by nimbus-org.
the class NestedPropertyTest method testParse2.
public void testParse2() throws Exception {
NestedProperty prop = new NestedProperty();
prop.parse("test.simple2");
Test test = new Test(new Test());
try {
prop.setProperty(test, "hoge");
fail();
} catch (NoSuchPropertyException e) {
}
}
use of jp.ossc.nimbus.beans.NestedProperty in project nimbus by nimbus-org.
the class NestedPropertyTest method testNew1.
public void testNew1() throws Exception {
NestedProperty prop = new NestedProperty(new SimpleProperty("test"), new SimpleProperty("simple"));
Test test = new Test(new Test());
prop.setProperty(test, "hoge");
assertEquals("hoge", prop.getProperty(test));
}
use of jp.ossc.nimbus.beans.NestedProperty in project nimbus by nimbus-org.
the class NestedPropertyTest method testNew2.
public void testNew2() throws Exception {
try {
NestedProperty prop = new NestedProperty(new SimpleProperty("test"), null);
fail();
} catch (Exception e) {
assertTrue(e instanceof IllegalArgumentException);
}
try {
NestedProperty prop = new NestedProperty(null, new SimpleProperty("simple"));
fail();
} catch (Exception e) {
assertTrue(e instanceof IllegalArgumentException);
}
}
Aggregations