assertEquals("Rabit", r.getName());
}
@Test
public void test_array_and_refer() {
Ioc ioc = I(J("fox", "name:'Fox'"),
J( "rabit",
"name:'Rabit',enemies:[{refer:'fox:org.nutz.ioc.json.pojo.Animal'},null]"));
Animal r = ioc.get(Animal.class, "rabit");
Animal f = ioc.get(Animal.class, "fox");
assertEquals(2, r.getEnemies().length);
assertTrue(f == r.getEnemies()[0]);
assertEquals("Fox", f.getName());
assertEquals("Rabit", r.getName());
assertNull(r.getEnemies()[1]);