use of jp.ossc.nimbus.beans.IndexedProperty in project nimbus by nimbus-org.
the class IndexedPropertyTest method testParse12.
public void testParse12() throws Exception {
IndexedProperty prop = new IndexedProperty();
prop.parse("[1]");
List test = new ArrayList();
prop.setProperty(test, "hoge");
assertEquals("hoge", prop.getProperty(test));
}
use of jp.ossc.nimbus.beans.IndexedProperty in project nimbus by nimbus-org.
the class IndexedPropertyTest method testNew2.
public void testNew2() throws Exception {
IndexedProperty prop = new IndexedProperty("indexed");
Test test = new Test();
prop.setIndex(0);
prop.setProperty(test, "hoge");
assertEquals("hoge", prop.getProperty(test));
prop.setIndex(1);
prop.setProperty(test, "fuga");
assertEquals("fuga", prop.getProperty(test));
}
use of jp.ossc.nimbus.beans.IndexedProperty in project nimbus by nimbus-org.
the class IndexedPropertyTest method testParse10.
public void testParse10() throws Exception {
IndexedProperty prop = new IndexedProperty();
prop.parse("indexed[1]");
Test test = new Test();
prop.setProperty(test, null);
assertNull(prop.getProperty(test));
}
use of jp.ossc.nimbus.beans.IndexedProperty in project nimbus by nimbus-org.
the class IndexedPropertyTest method testParse5.
public void testParse5() throws Exception {
IndexedProperty prop = new IndexedProperty();
prop.parse("arrayIndexes[3]");
Test test = new Test();
prop.setProperty(test, "hoge");
assertEquals("hoge", prop.getProperty(test));
}
use of jp.ossc.nimbus.beans.IndexedProperty in project nimbus by nimbus-org.
the class IndexedPropertyTest method testParse4.
public void testParse4() throws Exception {
IndexedProperty prop = new IndexedProperty();
prop.parse("indexes[0]");
Test test = new Test();
test.getIndexes().add(null);
prop.setProperty(test, "hoge");
assertEquals("hoge", prop.getProperty(test));
}
Aggregations