@Test public void eval_manys_with_null_field() { Entity<?> en = en(Base.class); ManyLinkField link = (ManyLinkField) en.getLinkFields("wavebands").get(0); assertEquals("wavebands", link.getName()); assertEquals("org.nutz.dao.test.meta.WaveBand", link.getLinkedEntity().getType().getName()); assertNull(link.getLinkedField()); assertNull(link.getHostField()); }
@Test public void eval_manys() { Entity<?> en = en(Base.class); ManyLinkField link = (ManyLinkField) en.getLinkFields("platoons").get(0); assertEquals("platoons", link.getName()); assertEquals("org.nutz.dao.test.meta.Platoon", link.getLinkedEntity().getType().getName()); assertEquals("baseName", link.getLinkedField().getName()); assertEquals("name", link.getHostField().getName()); }