use of org.drools.traits.core.util.StandaloneTraitFactory in project drools by kiegroup.
the class LegacyTraitTest method testTraitWithNonAccessorMethodShadowing.
@Test
public void testTraitWithNonAccessorMethodShadowing() {
StandaloneTraitFactory factory = createStandaloneTraitFactory();
try {
SomeInterface r = (SomeInterface) factory.don(new SomeClass(), SomeInterface.class);
r.prepare();
assertEquals(42, r.getFoo());
assertEquals("I did that", r.doThis("that"));
} catch (LogicalTypeInconsistencyException e) {
e.printStackTrace();
fail(e.getMessage());
}
}
Aggregations