use of org.jaffa.beans.factory.config.TestPersistentBean in project jaffa-framework by jaffa-projects.
the class PersistentConfigTest method testFallBackToPersistent.
/**
* Test add fallback pattern to the static context causes the class to initialize
*/
@Test
public void testFallBackToPersistent() throws PreAddFailedException, NoSuchFieldException, IllegalAccessException {
TestPersistentBean persistent = StaticContext.configure(new TestPersistentBean());
Field f = persistent.getClass().getSuperclass().getDeclaredField("validator");
f.setAccessible(true);
Validator validator = (Validator) f.get(persistent);
assertNotNull("bean should be initialized without a config for TestPersistentBean", validator);
}
Aggregations