Search in sources :

Example 1 with NestedProperty

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

Example 2 with NestedProperty

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) {
    }
}
Also used : NoSuchPropertyException(jp.ossc.nimbus.beans.NoSuchPropertyException) NestedProperty(jp.ossc.nimbus.beans.NestedProperty)

Example 3 with NestedProperty

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) {
    }
}
Also used : NoSuchPropertyException(jp.ossc.nimbus.beans.NoSuchPropertyException) NestedProperty(jp.ossc.nimbus.beans.NestedProperty)

Example 4 with NestedProperty

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

Example 5 with NestedProperty

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

Aggregations

NestedProperty (jp.ossc.nimbus.beans.NestedProperty)11 NoSuchPropertyException (jp.ossc.nimbus.beans.NoSuchPropertyException)6 InvocationTargetException (java.lang.reflect.InvocationTargetException)3 HashMap (java.util.HashMap)3 Iterator (java.util.Iterator)3 Map (java.util.Map)3 Property (jp.ossc.nimbus.beans.Property)3 DataSet (jp.ossc.nimbus.beans.dataset.DataSet)3 RecordList (jp.ossc.nimbus.beans.dataset.RecordList)3 SQLException (java.sql.SQLException)2 ArrayList (java.util.ArrayList)2 LinkedHashMap (java.util.LinkedHashMap)2 List (java.util.List)2 SimpleProperty (jp.ossc.nimbus.beans.SimpleProperty)2 Record (jp.ossc.nimbus.beans.dataset.Record)2 ParameterMetaData (java.sql.ParameterMetaData)1 ResultSet (java.sql.ResultSet)1 ResultSetMetaData (java.sql.ResultSetMetaData)1 LinkedHashSet (java.util.LinkedHashSet)1 Set (java.util.Set)1