Search in sources :

Example 1 with TestAbstractImpl

use of org.drools.core.util.asm.TestAbstractImpl in project drools by kiegroup.

the class BaseClassFieldAccessorFactoryTest method testAbstract.

@Test
public void testAbstract() throws Exception {
    final InternalReadAccessor ex = store.getReader(TestAbstract.class, "something");
    assertEquals(2, ex.getIndex());
    assertEquals("foo", ex.getValue(null, new TestAbstractImpl()));
}
Also used : InternalReadAccessor(org.drools.core.spi.InternalReadAccessor) TestAbstractImpl(org.drools.core.util.asm.TestAbstractImpl) Test(org.junit.Test)

Example 2 with TestAbstractImpl

use of org.drools.core.util.asm.TestAbstractImpl in project drools by kiegroup.

the class ClassFieldAccessorTest method testAbstract.

@Test
public void testAbstract() throws Exception {
    final ClassFieldReader ext = store.getReader(TestAbstract.class, "something");
    final TestAbstract obj = new TestAbstractImpl();
    assertEquals("foo", (String) ext.getValue(null, obj));
}
Also used : TestAbstractImpl(org.drools.core.util.asm.TestAbstractImpl) TestAbstract(org.drools.core.util.asm.TestAbstract) Test(org.junit.Test)

Aggregations

TestAbstractImpl (org.drools.core.util.asm.TestAbstractImpl)2 Test (org.junit.Test)2 InternalReadAccessor (org.drools.core.spi.InternalReadAccessor)1 TestAbstract (org.drools.core.util.asm.TestAbstract)1