Пример #1
0
  @Before
  public void setUp() throws Exception {

    service = new CommitteeDecisionServiceImpl();
    service.setProtocolActionService(KcServiceLocator.getService(ProtocolActionService.class));
    service.setBusinessObjectService(KcServiceLocator.getService(BusinessObjectService.class));
    service.setCommitteeService(getMockCommitteeService());
    service.setDocumentService(getMockDocumentService());

    protocolSubmitActionService = KcServiceLocator.getService(ProtocolSubmitActionService.class);
    protocolAssignCmtSchedService =
        KcServiceLocator.getService(ProtocolAssignCmtSchedService.class);
  }
Пример #2
0
  @Test
  public void testProcessApproveCommitteeDecision() throws Exception {
    Protocol protocol = getProtocolAssignedToAgenda();

    CommitteeDecision committeeDecision =
        getMockCommitteeDecisionBean(CommitteeDecisionMotionType.APPROVE);
    service.processCommitteeDecision(protocol, committeeDecision);

    ProtocolAction lastAction = protocol.getLastProtocolAction();
    assertNotNull(lastAction);
    assertEquals(
        ProtocolActionType.RECORD_COMMITTEE_DECISION, lastAction.getProtocolActionTypeCode());
    ProtocolSubmission submission = protocol.getProtocolSubmission();
    assertNotNull(submission);
    assertEquals(
        CommitteeDecisionMotionType.APPROVE, submission.getCommitteeDecisionMotionTypeCode());
    assertEquals(YES_COUNT, submission.getYesVoteCount());
    assertEquals(NO_COUNT, submission.getNoVoteCount());
    assertEquals(ABSTAIN_COUNT, submission.getAbstainerCount());
    assertEquals(RECUSED_COUNT, submission.getRecusedCount());
    assertEquals(VOTING_COMMENTS, submission.getVotingComments());
  }