Search in sources :

Example 1 with SimpleProperty

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

Example 2 with SimpleProperty

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

Example 3 with SimpleProperty

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

Example 4 with SimpleProperty

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

Example 5 with SimpleProperty

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

Aggregations

SimpleProperty (jp.ossc.nimbus.beans.SimpleProperty)9 NoSuchPropertyException (jp.ossc.nimbus.beans.NoSuchPropertyException)4 NestedProperty (jp.ossc.nimbus.beans.NestedProperty)2 InvocationTargetException (java.lang.reflect.InvocationTargetException)1 ArrayList (java.util.ArrayList)1 Collection (java.util.Collection)1 HashMap (java.util.HashMap)1 Iterator (java.util.Iterator)1 List (java.util.List)1 Map (java.util.Map)1 Property (jp.ossc.nimbus.beans.Property)1 DataSet (jp.ossc.nimbus.beans.dataset.DataSet)1 PropertySchemaDefineException (jp.ossc.nimbus.beans.dataset.PropertySchemaDefineException)1 Record (jp.ossc.nimbus.beans.dataset.Record)1 RecordList (jp.ossc.nimbus.beans.dataset.RecordList)1 RecordSchema (jp.ossc.nimbus.beans.dataset.RecordSchema)1