示例#1
0
 @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());
 }
示例#2
0
 @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());
 }