use of jp.ossc.nimbus.beans.SimpleProperty in project nimbus by nimbus-org.
the class SimplePropertyTest method testParse1.
public void testParse1() throws Exception {
SimpleProperty prop = new SimpleProperty();
prop.parse("simple");
Test test = new Test();
prop.setProperty(test, "hoge");
assertEquals("hoge", prop.getProperty(test));
}
use of jp.ossc.nimbus.beans.SimpleProperty in project nimbus by nimbus-org.
the class SimplePropertyTest method testParse2.
public void testParse2() throws Exception {
SimpleProperty prop = new SimpleProperty();
prop.parse("simple2");
Test test = new Test();
try {
prop.setProperty(test, "hoge");
fail();
} catch (NoSuchPropertyException e) {
}
}
use of jp.ossc.nimbus.beans.SimpleProperty in project nimbus by nimbus-org.
the class SimplePropertyTest method testParse4.
public void testParse4() throws Exception {
SimpleProperty prop = new SimpleProperty();
prop.parse("simple");
Map test = new HashMap();
prop.setProperty(test, "hoge");
assertEquals("hoge", prop.getProperty(test));
}
use of jp.ossc.nimbus.beans.SimpleProperty 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.SimpleProperty 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