Package test.po

Examples of test.po.Master


  @Test
  public void testDivPageByFieldIsValueByPOJO() {
    String[] fields = new String[] { "name", "age", "master" };
    pet.setName("小白");
    pet.setAge(19);
    Master master = new Master();
    master.setId(8L);
    pet.setMaster(master);
    String sql = select.selectWhere(fields, "age+0", 1, 2, 5);
    Assert.assertEquals(
        "SELECT id, num, name, age, cate, master_id FROM t_pet  WHERE name  =  '小白'  AND age  =  '19'  AND master_id  =  '8'  ORDER BY age"
            + fieldAdd + " ASC LIMIT 5, 5 ;", sql);
View Full Code Here


   *
   * @throws Exception
   */
  @Test
  public void testInsertWithOneRel() throws Exception {
    Master master = new Master();
    master.setId(5L);
    pet.setName("xiaohei");
    pet.setAge(2);
    pet.setMaster(master);
    String[] fields = { "name", "age", "master" };
    String sql = insert.createByFields(fields)[0];
View Full Code Here

   *
   * @throws Exception
   */
  @Test
  public void testDeleteByOneRelField() throws Exception {
    Master master = new Master();
    master.setId(5L);
    pet.setMaster(master);
    String[] fields = { "master" };
    String sql = delete.delete(fields)[0];
    Assert.assertEquals("DELETE FROM t_pet WHERE master_id = '5' ;", sql);
  }
View Full Code Here

TOP

Related Classes of test.po.Master

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.