Package net.sf.esims.model.entity

Examples of net.sf.esims.model.entity.SchoolEssence


    DatabaseOperation.DELETE_ALL.execute(connection, academicYearDataSet);
    DatabaseOperation.DELETE_ALL.execute(connection, schoolDataSet);

    Date startDate = EsimsUtils.createDate(1, Calendar.JUNE, 2005);
    Date endDate = EsimsUtils.createDate(15, Calendar.MARCH, 2006);
    SchoolEssence schoolEssence = UtilsForTestCases
        .createValidSchoolEssence();
    School school = schoolEssence.createSchool();
    schoolDAO.save(school);
    AcademicYear academicYear = new AcademicYear("2005-2006", school,
        startDate, endDate, "active");
    academicYearDAO.save(academicYear);
View Full Code Here


    DatabaseOperation.DELETE_ALL.execute(connection, academicYearDataSet);
    DatabaseOperation.DELETE_ALL.execute(connection, schoolDataSet);

    Date startDate = EsimsUtils.createDate(1, Calendar.JUNE, 2005);
    Date endDate = EsimsUtils.createDate(15, Calendar.MARCH, 2006);
    SchoolEssence schoolEssence = UtilsForTestCases
        .createValidSchoolEssence();
    School school = schoolEssence.createSchool();

    schoolDAO.save(school);
    AcademicYear academicYear = new AcademicYear("2005-2006", school,
        startDate, endDate, "active");
    academicYearDAO.save(academicYear);
View Full Code Here

  private SchoolDAOIfc schoolDAO;
 
 
  public void testSave() throws Exception{
    DatabaseOperation.DELETE_ALL.execute(connection, schoolDataSet);
    SchoolEssence essence = this.createValidInstance();
    School school = essence.createSchool();
    this.schoolDAO.save(school);
    DatabaseOperation.DELETE_ALL.execute(connection, schoolDataSet);
  }
View Full Code Here

    DatabaseOperation.DELETE_ALL.execute(connection, schoolDataSet);
  }
 
  public void testDelete() throws Exception{
    DatabaseOperation.DELETE_ALL.execute(connection, schoolDataSet);
    SchoolEssence essence = this.createValidInstance();
    School school = essence.createSchool();
    this.schoolDAO.save(school);
    this.schoolDAO.delete(school);
   
    try{
      this.schoolDAO.save(null);
View Full Code Here

    DatabaseOperation.DELETE_ALL.execute(connection, schoolDataSet);
  }
 
  public void testGets() throws Exception{
    DatabaseOperation.DELETE_ALL.execute(connection, schoolDataSet);
    SchoolEssence essence = this.createValidInstance();
    School school = essence.createSchool();
    this.schoolDAO.save(school);
    List<School> listOfSchools = this.schoolDAO.getAll();
    assertNotNull(listOfSchools);
    Long id = listOfSchools.get(0).getSchoolId();
    assertNotNull(this.schoolDAO.get(id));
   
    assertNotNull(this.schoolDAO.getSchoolsByBoardOfEducation(essence.getBoardOfEducation()));
    assertNotNull(this.schoolDAO.getSchoolsByPrincipalFirstName(essence.getPrincipalFirstName()));
    assertNotNull(this.schoolDAO.getSchoolsByName(essence.getSchoolName()));
    DatabaseOperation.DELETE_ALL.execute(connection, schoolDataSet);
  }
View Full Code Here

    schoolDataSet = getDataSet("schoolDataSet.xml");
  }
 
 
  private SchoolEssence createValidInstance(){
    SchoolEssence essence = new SchoolEssence();
    essence.setAddressLine1("ADD1");
    essence.setAddressLine2("ADD2");
    essence.setAddressLine3("ADD3");
    essence.setBoardOfEducation("CBSE");
    essence.setCountry("India");
    essence.setDistrict("Bengalooru");
    essence.setEmail("fictious_man@fictiousschool.com");
    essence.setFax("8023423450");
    essence.setIsActive(Boolean.TRUE);
    essence.setManagement("Test mgmt");
    essence.setPhone1("8023423450");
    essence.setPhone1("8023423450");
    essence.setPhone1("8023423450");
    essence.setPincode("654321");
    essence.setPrincipalFirstName("Muttal");
    essence.setPrincipalMiddleName("Kashapp");
    essence.setPrincipalLastName("Raman");
    essence.setSchoolName("Fictious school");
    essence.setSchoolCode("ABC");
    essence.setState("Karanataka");
    essence.setVicePrincipalFirstName("Dodda");
    essence.setVicePrincipalMiddleName("Belliappa");
    essence.setVicePrincipalLastName("Puttanna");
    return essence;
  }
View Full Code Here

  }
 
  public void testGetActiveAcademicYear()throws Exception{
    DatabaseOperation.DELETE_ALL.execute(connection, academicYearDataSet);
    DatabaseOperation.DELETE_ALL.execute(connection, schoolDataSet);
    SchoolEssence schoolEssence =UtilsForTestCases.createValidSchoolEssence();
    School school =schoolEssence.createSchool();
   
    this.schoolDAO.save(school);
   
    Date d1 = EsimsUtils.createDate(12, Calendar.MARCH, 2007);
    Date d2 = EsimsUtils.createDate(13, Calendar.MARCH, 2008);   
View Full Code Here

 
  public void testGetAcademicYearByDescription()throws Exception{
    DatabaseOperation.DELETE_ALL.execute(connection, academicYearDataSet);
    DatabaseOperation.DELETE_ALL.execute(connection, schoolDataSet);
   
    SchoolEssence schoolEssence =UtilsForTestCases.createValidSchoolEssence();
    School school =schoolEssence.createSchool();
   
    this.schoolDAO.save(school);
   
    Date d1 = EsimsUtils.createDate(12, Calendar.MARCH, 2007);
    Date d2 = EsimsUtils.createDate(13, Calendar.MARCH, 2008);   
View Full Code Here

    DatabaseOperation.DELETE_ALL.execute(connection, schoolDataSet)
   
    Date startDate1 = EsimsUtils.createDate(1, Calendar.JUNE, 2005);
    Date endDate1 = EsimsUtils.createDate(15, Calendar.MARCH, 2006);
   
    SchoolEssence schoolEssence =UtilsForTestCases.createValidSchoolEssence();
    School school =schoolEssence.createSchool();
    this.schoolDAO.save(school);
   
    AcademicYear academicYear = new AcademicYear("2005-2006",school,startDate1,endDate1,"active");
    academicYearDAO.save(academicYear);
   
View Full Code Here

   
   
    Date startDate1 = EsimsUtils.createDate(1, Calendar.JUNE, 2005);
    Date endDate1 = EsimsUtils.createDate(15, Calendar.MARCH, 2006);
   
    SchoolEssence schoolEssence =UtilsForTestCases.createValidSchoolEssence();
    School school =schoolEssence.createSchool();
    this.schoolDAO.save(school);
     
    AcademicYear academicYear = new AcademicYear("2005-2006",school,startDate1,endDate1,"history");
    AcademicYear academicYear2 = new AcademicYear("2006-2007",school,startDate1,endDate1,"history");
    academicYearDAO.save(academicYear);
View Full Code Here

TOP

Related Classes of net.sf.esims.model.entity.SchoolEssence

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.