Package org.nutz.dao.test.meta

Examples of org.nutz.dao.test.meta.Base


        pojos.initData();
    }
   
    @Test
    public void test_lazy_get() {
        Base base = dao.fetch(Base.class);
        System.out.println("------------------------------------------");
        System.out.println(base.getCountry()); //一个@One属性
        System.out.println(base.getPlatoons());
    }
View Full Code Here


   
    @Test
    public void test_lazy_toJson() {
      LazyNutDao dao = new LazyNutDao(ioc.get(DataSource.class));
      dao.setCycle(false);
      Base base = dao.fetch(Base.class);
      System.out.println("================"+Json.toJson(base));
    }
View Full Code Here

        assertNull(x.type);
    }

    @Test
    public void test_output_not_quote_name() {
        Base b = Base.make("Red");
        String json = Json.toJson(b, JsonFormat.compact().setQuoteName(false));
        Base b2 = Json.fromJson(Base.class, json);
        assertEquals(b.getCountryId(), b2.getCountryId());
        assertEquals(b.getLevel(), b2.getLevel());
        assertEquals(b.getName(), b2.getName());
    }
View Full Code Here

TOP

Related Classes of org.nutz.dao.test.meta.Base

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.