Package org.crank.crud.test.dao

Examples of org.crank.crud.test.dao.EmployeeDAO


  }


    @Test(groups = "modifies")
    public void testUpdateSupport() {
        EmployeeDAO employeeDAO = (EmployeeDAO) this.employeeDao;
        List<Employee> employees = employeeDAO
                .findEmployeesByDepartment("Engineering");
        AssertJUnit.assertTrue(employees.size() > 0);


        long recordsEffected = employeeDAO
                .updateEmployeeActiveStatusByLastName("Hightower", true);
        assertEquals(1, recordsEffected);


    }
View Full Code Here


    }

    @Test(groups = "updates", dependsOnGroups = "modifies")
    public void testDeleteSupport() {
        EmployeeDAO employeeDAO = (EmployeeDAO) this.employeeDao;

        List<Employee> employees = employeeDAO
                .findEmployeesByDepartment("Engineering");
        AssertJUnit.assertTrue(employees.size() > 0);

        int deletedEmps = employeeDAO
                .deleteEmployeesByLastName("Hightower");

        AssertJUnit.assertEquals(1, deletedEmps);

    }
View Full Code Here

    AssertJUnit.assertTrue(employees.size() > 0);
  }

  @Test (groups="reads", dependsOnGroups="createsObjectInDB")
  public void testFinderSupport() {
    EmployeeDAO employeeDAO = (EmployeeDAO) this.employeeDao;
    List<Employee> employees = employeeDAO
        .findEmployeesByDepartment("Engineering");
    AssertJUnit.assertTrue(employees.size() > 0);

  }
View Full Code Here

  }

  @Test (groups="reads", dependsOnGroups="createsObjectInDB")
  public void testFindRelatedField() {
    EmployeeDAO employeeDAO = (EmployeeDAO) this.employeeDao;
    List<Employee> employees = employeeDAO.find("department.name",
        "Engineering");
    AssertJUnit.assertTrue(employees.size() > 0);
  }
View Full Code Here

    AssertJUnit.assertTrue(employees.size() > 0);
  }
 
  @Test (groups="reads", dependsOnGroups="createsObjectInDB")
  public void testFindRelatedField2() {
    EmployeeDAO employeeDAO = (EmployeeDAO) this.employeeDao;
    List<Employee> employees = employeeDAO.find(join(join("o.department", true, "foo")), eq("foo.name", true, "Engineering"));
    AssertJUnit.assertTrue(employees.size() > 0);
  }
View Full Code Here

    AssertJUnit.assertTrue(result.size() > 0);
  }
 
  @Test (groups="reads", dependsOnGroups="createsObjectInDB")
  public void testFindRelatedFieldWithUnderBar() {
    EmployeeDAO employeeDAO = (EmployeeDAO) this.employeeDao;
    List<Employee> employees = employeeDAO.find("department_name",
        "Engineering");
    AssertJUnit.assertTrue(employees.size() > 0);
  }
View Full Code Here

    AssertJUnit.assertTrue(employees.size() > 0);
  }

  @Test (groups="reads", dependsOnGroups="createsObjectInDB")
  public void testFindRelatedFieldWithSearchOrdered() {
    EmployeeDAO employeeDAO = (EmployeeDAO) this.employeeDao;
    List<Employee> employees = employeeDAO.searchOrdered(eq(
        "department.name", "Engineering"), "department.name");
    AssertJUnit.assertTrue(employees.size() > 0);
  }
View Full Code Here

    AssertJUnit.assertTrue(employees.size() > 0);
  }

  @Test (groups="reads", dependsOnGroups="createsObjectInDB")
  public void testFindRelatedFieldWithSearchOrderedWithUnderBar() {
    EmployeeDAO employeeDAO = (EmployeeDAO) this.employeeDao;
    List<Employee> employees = employeeDAO.searchOrdered(eq(
        "department_name", "Engineering"), "department_name");
    AssertJUnit.assertTrue(employees.size() > 0);
  }
View Full Code Here

TOP

Related Classes of org.crank.crud.test.dao.EmployeeDAO

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.