Package org.nutz.ioc.json.pojo

Examples of org.nutz.ioc.json.pojo.Mammal


  @Test
  public void test_simple() {
    IocLoader il = new JsonLoader("org/nutz/ioc/json/aop.js");
    Ioc ioc = new NutIoc(il);
    StringBuilder sb = ioc.get(StringBuilder.class, "sb");
    Mammal fox = ioc.get(Mammal.class, "fox");

    assertEquals("Fox", fox.getName());
    assertEquals("B:getName0;A:getName0;", sb.toString());
    sb.delete(0, sb.length());
    fox.getName();
    fox.getName();
    assertEquals("B:getName0;A:getName0;B:getName0;A:getName0;", sb.toString());

  }
View Full Code Here


    @Test
    public void test_simple() {
        IocLoader il = new JsonLoader("org/nutz/ioc/json/aop.js");
        Ioc ioc = new NutIoc(il);
        StringBuilder sb = ioc.get(StringBuilder.class, "sb");
        Mammal fox = ioc.get(Mammal.class, "fox");

        assertEquals("Fox", fox.getName());
        assertEquals("B:getName0;A:getName0;", sb.toString());
        sb.delete(0, sb.length());
        fox.getName();
        fox.getName();
        assertEquals("B:getName0;A:getName0;B:getName0;A:getName0;", sb.toString());

    }
View Full Code Here

    public void test_simple() {
      DefaultClassDefiner.reset();
        IocLoader il = new JsonLoader("org/nutz/ioc/json/aop.js");
        Ioc ioc = new NutIoc(il);
        StringBuilder sb = ioc.get(StringBuilder.class, "sb");
        Mammal fox = ioc.get(Mammal.class, "fox");

        assertEquals("Fox", fox.getName());
        assertEquals("B:getName0;A:getName0;", sb.toString());
        sb.delete(0, sb.length());
        fox.getName();
        fox.getName();
        assertEquals("B:getName0;A:getName0;B:getName0;A:getName0;", sb.toString());

    }
View Full Code Here

TOP

Related Classes of org.nutz.ioc.json.pojo.Mammal

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.