@Test public void propertyReflectionAwareModelNoProperty() throws Exception { A a = new A(); a.b = new B(); LazyModel<C> model = model(from(a).getB().getC(0)); assertNull(model.getPropertyField()); assertNull(model.getPropertyGetter()); assertNull(model.getPropertySetter()); }
@Test public void propertyReflectionAwareModel() throws Exception { A a = new A(); a.b = new B(); LazyModel<Character> model = model(from(a).getB().getCharacter()); assertNull(model.getPropertyField()); assertEquals(B.class.getMethod("getCharacter"), model.getPropertyGetter()); assertEquals(B.class.getMethod("setCharacter", Character.TYPE), model.getPropertySetter()); }