Search in sources :

Example 1 with TestInterfaceImpl

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

the class BaseClassFieldAccessorFactoryTest method testInterface.

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

Example 2 with TestInterfaceImpl

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

the class ClassFieldAccessorTest method testInterface.

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

Aggregations

TestInterfaceImpl (org.drools.core.util.asm.TestInterfaceImpl)2 Test (org.junit.Test)2 InternalReadAccessor (org.drools.core.spi.InternalReadAccessor)1 TestInterface (org.drools.core.util.asm.TestInterface)1