Package com.vst.model

Examples of com.vst.model.AuthentificationElement


         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);
               errors.rejectValue("authentificationElements["+i+"]", "defectZone.noAuthentificationElement");

             }
View Full Code Here


        authentificationElementManager = null;
    }

    public void testGetAuthentificationElements() throws Exception {
        List results = new ArrayList();
        AuthentificationElement authentificationElement = new AuthentificationElement();
        results.add(authentificationElement);

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

    }

    public void testGetAuthentificationElement() throws Exception {
        // set expected behavior on dao
        authentificationElementDao.expects(once()).method("getAuthentificationElement")
            .will(returnValue(new AuthentificationElement()));
        AuthentificationElement authentificationElement = authentificationElementManager.getAuthentificationElement(authentificationElementId);
        assertTrue(authentificationElement != null);
        authentificationElementDao.verify();
    }
View Full Code Here

        assertTrue(authentificationElement != null);
        authentificationElementDao.verify();
    }

    public void testSaveAuthentificationElement() throws Exception {
        AuthentificationElement authentificationElement = new AuthentificationElement();

        // set expected behavior on dao
        authentificationElementDao.expects(once()).method("saveAuthentificationElement")
            .with(same(authentificationElement)).isVoid();
View Full Code Here

        authentificationElementManager.saveAuthentificationElement(authentificationElement);
        authentificationElementDao.verify();
    }

    public void testAddAndRemoveAuthentificationElement() throws Exception {
        AuthentificationElement authentificationElement = new AuthentificationElement();

        // set required fields

        // set expected behavior on dao
        authentificationElementDao.expects(once()).method("saveAuthentificationElement")
            .with(same(authentificationElement)).isVoid();
        authentificationElementManager.saveAuthentificationElement(authentificationElement);
        authentificationElementDao.verify();

        // reset expectations
        authentificationElementDao.reset();

        authentificationElementDao.expects(once()).method("removeAuthentificationElement").with(eq(new Long(authentificationElementId)));
        authentificationElementManager.removeAuthentificationElement(authentificationElementId);
        authentificationElementDao.verify();

        // reset expectations
        authentificationElementDao.reset();
        // remove
        Exception ex = new ObjectRetrievalFailureException(AuthentificationElement.class, authentificationElement.getAuthentificationId());
        authentificationElementDao.expects(once()).method("removeAuthentificationElement").isVoid();
        authentificationElementDao.expects(once()).method("getAuthentificationElement").will(throwException(ex));
        authentificationElementManager.removeAuthentificationElement(authentificationElementId);
        try {
            authentificationElementManager.getAuthentificationElement(authentificationElementId);
View Full Code Here

    /**
     * @see com.vst.dao.AuthentificationElementDao#getAuthentificationElement(Integer authentificationId)
     */
    public AuthentificationElement getAuthentificationElement(final Integer authentificationId) {
        AuthentificationElement authentificationElement = (AuthentificationElement) getObject(authentificationId);
        return authentificationElement;
    }
View Full Code Here

TOP

Related Classes of com.vst.model.AuthentificationElement

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.