Search in sources :

Example 1 with MappedProperty

use of jp.ossc.nimbus.beans.MappedProperty in project nimbus by nimbus-org.

the class MappedPropertyTest method testNew1.

public void testNew1() throws Exception {
    MappedProperty prop = new MappedProperty("mapped", "fuga");
    Test test = new Test();
    prop.setProperty(test, "hoge");
    assertEquals("hoge", prop.getProperty(test));
}
Also used : MappedProperty(jp.ossc.nimbus.beans.MappedProperty)

Example 2 with MappedProperty

use of jp.ossc.nimbus.beans.MappedProperty in project nimbus by nimbus-org.

the class MappedPropertyTest method testParse8.

public void testParse8() throws Exception {
    MappedProperty prop = new MappedProperty();
    prop.parse("(fuga)");
    MappedObject test = new MappedObject();
    prop.setProperty(test, null);
    assertNull(prop.getProperty(test));
}
Also used : MappedProperty(jp.ossc.nimbus.beans.MappedProperty)

Example 3 with MappedProperty

use of jp.ossc.nimbus.beans.MappedProperty in project nimbus by nimbus-org.

the class MappedPropertyTest method testParse3.

public void testParse3() throws Exception {
    MappedProperty prop = new MappedProperty();
    prop.parse("mapped2(fuga)");
    Test test = new Test();
    try {
        prop.getProperty(test);
        fail();
    } catch (NoSuchPropertyException e) {
    }
}
Also used : MappedProperty(jp.ossc.nimbus.beans.MappedProperty) NoSuchPropertyException(jp.ossc.nimbus.beans.NoSuchPropertyException)

Example 4 with MappedProperty

use of jp.ossc.nimbus.beans.MappedProperty in project nimbus by nimbus-org.

the class MappedPropertyTest method testParse7.

public void testParse7() throws Exception {
    MappedProperty prop = new MappedProperty();
    prop.parse("(fuga)");
    Test test = new Test();
    prop.setProperty(test, null);
    assertNull(prop.getProperty(test));
}
Also used : MappedProperty(jp.ossc.nimbus.beans.MappedProperty)

Example 5 with MappedProperty

use of jp.ossc.nimbus.beans.MappedProperty in project nimbus by nimbus-org.

the class MappedPropertyTest method testParse5.

public void testParse5() throws Exception {
    MappedProperty prop = new MappedProperty();
    prop.parse("(fuga)");
    MappedObject test = new MappedObject();
    prop.setProperty(test, new Integer(1));
    assertEquals(new Integer(1), prop.getProperty(test));
}
Also used : MappedProperty(jp.ossc.nimbus.beans.MappedProperty)

Aggregations

MappedProperty (jp.ossc.nimbus.beans.MappedProperty)10 NoSuchPropertyException (jp.ossc.nimbus.beans.NoSuchPropertyException)2