Package com.vst.model

Examples of com.vst.model.DefectZone


        DefectZone defectZone = dao.getDefectZone(defectZoneId);
        assertNotNull(defectZone);
    }

    public void testGetDefectZones() throws Exception {
        DefectZone defectZone = new DefectZone();

        List results = dao.getDefectZones(defectZone);
        assertTrue(results.size() > 0);
    }
View Full Code Here


        List results = dao.getDefectZones(defectZone);
        assertTrue(results.size() > 0);
    }

    public void testSaveDefectZone() throws Exception {
        DefectZone defectZone = dao.getDefectZone(defectZoneId);

        // update required fields

        dao.saveDefectZone(defectZone);
View Full Code Here

              (Integer) rescolumns[0], (String) rescolumns[1]);
            DefectType dt = new DefectType(
               (Integer) rescolumns[2], (String) rescolumns[3]);
            DefectVarity dv = new DefectVarity(
              (Integer) rescolumns[4], (String) rescolumns[5]);
            DefectZone dz = new DefectZone(
               (Integer) rescolumns[6], (String) rescolumns[7]);

            cd.setDefectType(dt);
            cd.setDefectVarity(dv);
            cd.setDefectZone(dz);
View Full Code Here

        defectZoneManager = null;
    }

    public void testGetDefectZones() throws Exception {
        List results = new ArrayList();
        DefectZone defectZone = new DefectZone();
        results.add(defectZone);

        // set expected behavior on dao
        defectZoneDao.expects(once()).method("getDefectZones")
            .will(returnValue(results));
View Full Code Here

    }

    public void testGetDefectZone() throws Exception {
        // set expected behavior on dao
        defectZoneDao.expects(once()).method("getDefectZone")
            .will(returnValue(new DefectZone()));
        DefectZone defectZone = defectZoneManager.getDefectZone(defectZoneId);
        assertTrue(defectZone != null);
        defectZoneDao.verify();
    }
View Full Code Here

        assertTrue(defectZone != null);
        defectZoneDao.verify();
    }

    public void testSaveDefectZone() throws Exception {
        DefectZone defectZone = new DefectZone();

        // set expected behavior on dao
        defectZoneDao.expects(once()).method("saveDefectZone")
            .with(same(defectZone)).isVoid();
View Full Code Here

        defectZoneManager.saveDefectZone(defectZone);
        defectZoneDao.verify();
    }

    public void testAddAndRemoveDefectZone() throws Exception {
        DefectZone defectZone = new DefectZone();

        // set required fields

        // set expected behavior on dao
        defectZoneDao.expects(once()).method("saveDefectZone")
            .with(same(defectZone)).isVoid();
        defectZoneManager.saveDefectZone(defectZone);
        defectZoneDao.verify();

        // reset expectations
        defectZoneDao.reset();

        defectZoneDao.expects(once()).method("removeDefectZone").with(eq(new Long(defectZoneId)));
        defectZoneManager.removeDefectZone(defectZoneId);
        defectZoneDao.verify();

        // reset expectations
        defectZoneDao.reset();
        // remove
        Exception ex = new ObjectRetrievalFailureException(DefectZone.class, defectZone.getDefectZoneId());
        defectZoneDao.expects(once()).method("removeDefectZone").isVoid();
        defectZoneDao.expects(once()).method("getDefectZone").will(throwException(ex));
        defectZoneManager.removeDefectZone(defectZoneId);
        try {
            defectZoneManager.getDefectZone(defectZoneId);
View Full Code Here

         return DefectZone.class.isAssignableFrom(candidate);
     }

     public void validate(Object obj, Errors errors) {

         DefectZone defectZone=(DefectZone)obj;

         System.out.println("Validating"+defectZone);
         //checking if all defects were chosen
         List authentificationList=defectZone.getAuthentificationElements();
         for (int i = 0; i < authentificationList.size(); i++) {
             AuthentificationElement authentificationElement = (AuthentificationElement) authentificationList.get(i);
             if(authentificationElement.getAuthentificationId().equals(new Long(-1))){
      
                 System.out.println("Validating error"+authentificationElement);
View Full Code Here

        //checking defect zones
        List defectZones = constructionType.getDefectZones();

        for (int i = 0; i < defectZones.size(); i++) {
            DefectZone defectZone = (DefectZone) defectZones.get(i);
            if (defectZone.getDefectZoneId().equals(new Long(-1))) {
                errors.rejectValue("defectZones[" + i + "]", "constructionType.noDefectZone");

            }

        }
View Full Code Here

              (Integer) rescolumns[0], (String) rescolumns[1]);
            DefectType dt = new DefectType(
               (Integer) rescolumns[2], (String) rescolumns[3]);
            DefectVarity dv = new DefectVarity(
              (Integer) rescolumns[4], (String) rescolumns[5]);
            DefectZone dz = new DefectZone(
               (Integer) rescolumns[6], (String) rescolumns[7]);

            cd.setDefectType(dt);
            cd.setDefectVarity(dv);
            cd.setDefectZone(dz);
View Full Code Here

TOP

Related Classes of com.vst.model.DefectZone

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.