Search in sources :

Example 6 with MappedProperty

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

the class MappedPropertyTest method testParse6.

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

Example 7 with MappedProperty

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

the class MappedPropertyTest method testNew2.

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

Example 8 with MappedProperty

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

the class MappedPropertyTest method testParse1.

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

Example 9 with MappedProperty

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

the class MappedPropertyTest method testParse2.

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

Example 10 with MappedProperty

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

the class MappedPropertyTest method testParse4.

public void testParse4() throws Exception {
    MappedProperty prop = new MappedProperty();
    prop.parse("(fuga)");
    Test test = new Test();
    prop.setProperty(test, "hoge");
    assertEquals("hoge", 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