Search in sources :

Example 6 with SubKlass_

use of org.drools.core.meta.org.test.SubKlass_ in project drools by kiegroup.

the class MetadataTest method testKlassAndSubKlassWithImpl.

@Test
public void testKlassAndSubKlassWithImpl() {
    SubKlass ski = new SubKlassImpl();
    ski.setSubProp(42);
    ski.setProp("hello");
    SubKlass_ sk = new SubKlass_(ski);
    assertEquals(42, (int) sk.subProp.get(ski));
    assertEquals("hello", sk.prop.get(ski));
    sk.modify().prop("bye").subProp(-99).call();
    assertEquals(-99, (int) sk.subProp.get(ski));
    assertEquals("bye", sk.prop.get(ski));
}
Also used : SubKlassImpl(org.drools.core.meta.org.test.SubKlassImpl) SubKlass_(org.drools.core.meta.org.test.SubKlass_) SubKlass(org.drools.core.meta.org.test.SubKlass) Test(org.junit.Test)

Aggregations

SubKlass_ (org.drools.core.meta.org.test.SubKlass_)6 Test (org.junit.Test)6 SubKlass (org.drools.core.meta.org.test.SubKlass)4 SubKlassImpl (org.drools.core.meta.org.test.SubKlassImpl)4 AnotherKlass (org.drools.core.meta.org.test.AnotherKlass)2 AnotherKlassImpl (org.drools.core.meta.org.test.AnotherKlassImpl)2 AnotherKlass_ (org.drools.core.meta.org.test.AnotherKlass_)2 HashMap (java.util.HashMap)1 Map (java.util.Map)1 Klass (org.drools.core.meta.org.test.Klass)1 KlassImpl (org.drools.core.meta.org.test.KlassImpl)1 Klass_ (org.drools.core.meta.org.test.Klass_)1