Package com.vst.model

Examples of com.vst.model.QuestionType


        assertTrue(questionType != null);
        questionTypeDao.verify();
    }

    public void testSaveQuestionType() throws Exception {
        QuestionType questionType = new QuestionType();

        // set expected behavior on dao
        questionTypeDao.expects(once()).method("saveQuestionType")
            .with(same(questionType)).isVoid();
View Full Code Here


        questionTypeManager.saveQuestionType(questionType);
        questionTypeDao.verify();
    }

    public void testAddAndRemoveQuestionType() throws Exception {
        QuestionType questionType = new QuestionType();

        // set required fields

        // set expected behavior on dao
        questionTypeDao.expects(once()).method("saveQuestionType")
            .with(same(questionType)).isVoid();
        questionTypeManager.saveQuestionType(questionType);
        questionTypeDao.verify();

        // reset expectations
        questionTypeDao.reset();

        questionTypeDao.expects(once()).method("removeQuestionType").with(eq(new Long(questionTypeId)));
        questionTypeManager.removeQuestionType(questionTypeId);
        questionTypeDao.verify();

        // reset expectations
        questionTypeDao.reset();
        // remove
        Exception ex = new ObjectRetrievalFailureException(QuestionType.class, questionType.getQuestionTypeId());
        questionTypeDao.expects(once()).method("removeQuestionType").isVoid();
        questionTypeDao.expects(once()).method("getQuestionType").will(throwException(ex));
        questionTypeManager.removeQuestionType(questionTypeId);
        try {
            questionTypeManager.getQuestionType(questionTypeId);
View Full Code Here

    /**
     * @see com.vst.dao.QuestionTypeDao#getQuestionType(Integer questionTypeId)
     */
    public QuestionType getQuestionType(final Integer questionTypeId) {
        QuestionType questionType = (QuestionType) getObject(questionTypeId);
        return questionType;
    }
View Full Code Here

TOP

Related Classes of com.vst.model.QuestionType

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.