Package se.inera.ifv.casebox.core.service

Examples of se.inera.ifv.casebox.core.service.QuestionService


    @Test
    public void testDeleteQuestions() throws Exception {
        Capture<String> careUnit = new Capture<String>();
        Capture<Set<Long>> ids = new Capture<Set<Long>>();

        QuestionService questionService = createMock(QuestionService.class);
        questionService.deleteQuestionsForCareUnit(capture(careUnit), capture(ids));
        expectLastCall();

        DeleteQuestionsImpl impl = new DeleteQuestionsImpl();
        impl.setQuestionService(questionService);
View Full Code Here


    @Test
    public void testInvoke() throws Exception {
        Capture<Question> question = new Capture<Question>();

        QuestionService questionService = createMock(QuestionService.class);
        expect(questionService.saveQuestion(capture(question))).andReturn(1L);

        ReceiveMedicalCertificateQuestionImpl impl = new ReceiveMedicalCertificateQuestionImpl();
        impl.setQuestionService(questionService);

        replay(questionService);
View Full Code Here

   
    @Test
    public void testInvokeError() throws Exception {
        Capture<Question> question = new Capture<Question>();

        QuestionService questionService = createMock(QuestionService.class);
        expect(questionService.saveQuestion(capture(question))).andThrow(new RuntimeException("Some message"));

        ReceiveMedicalCertificateQuestionImpl impl = new ReceiveMedicalCertificateQuestionImpl();
        impl.setQuestionService(questionService);

        replay(questionService);
View Full Code Here

TOP

Related Classes of se.inera.ifv.casebox.core.service.QuestionService

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.