Search in sources :

Example 1 with IndexedProperty

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));
}
Also used : IndexedProperty(jp.ossc.nimbus.beans.IndexedProperty)

Example 2 with IndexedProperty

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));
}
Also used : IndexedProperty(jp.ossc.nimbus.beans.IndexedProperty)

Example 3 with IndexedProperty

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));
}
Also used : IndexedProperty(jp.ossc.nimbus.beans.IndexedProperty)

Example 4 with IndexedProperty

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));
}
Also used : IndexedProperty(jp.ossc.nimbus.beans.IndexedProperty)

Example 5 with IndexedProperty

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));
}
Also used : IndexedProperty(jp.ossc.nimbus.beans.IndexedProperty)

Aggregations

IndexedProperty (jp.ossc.nimbus.beans.IndexedProperty)15 NoSuchPropertyException (jp.ossc.nimbus.beans.NoSuchPropertyException)3 InvocationTargetException (java.lang.reflect.InvocationTargetException)1 HashMap (java.util.HashMap)1 Iterator (java.util.Iterator)1 Map (java.util.Map)1 ConcurrentHashMap (java.util.concurrent.ConcurrentHashMap)1 ConcurrentMap (java.util.concurrent.ConcurrentMap)1 ServletRequest (javax.servlet.ServletRequest)1 HttpServletRequest (javax.servlet.http.HttpServletRequest)1 NestedProperty (jp.ossc.nimbus.beans.NestedProperty)1 Property (jp.ossc.nimbus.beans.Property)1 DataSet (jp.ossc.nimbus.beans.dataset.DataSet)1 PropertySetException (jp.ossc.nimbus.beans.dataset.PropertySetException)1 Record (jp.ossc.nimbus.beans.dataset.Record)1 RecordList (jp.ossc.nimbus.beans.dataset.RecordList)1 BeanFlowInvoker (jp.ossc.nimbus.service.beancontrol.interfaces.BeanFlowInvoker)1