示例#1
0
  private void setupKookooContext() {
    HttpServletRequest httpRequest = mock(HttpServletRequest.class);
    HttpSession session = mock(HttpSession.class);

    when(kooKooIVRContext.httpRequest()).thenReturn(httpRequest);
    when(httpRequest.getSession()).thenReturn(session);
    when(kooKooIVRContext.cookies()).thenReturn(cookies);
  }
  @Before
  public void setUp() {
    initMocks(this);
    tamaCallFlowController = new TAMACallFlowController(treeRegistry, allPatients, contextFactory);
    tamaCallFlowController.registerPillModule(pillModuleStrategy);
    tamaCallFlowController.registerOutboxModule();
    tamaCallFlowController.registerSymptomModule(symptomModuleStrategy);

    when(kooKooIVRContext.cookies()).thenReturn(cookies);
    tamaIVRContext = new TAMAIVRContextForTest(kooKooIVRContext);
    when(contextFactory.create(kooKooIVRContext)).thenReturn(tamaIVRContext);
  }
示例#3
0
 public OutboxContext(KooKooIVRContext kooKooIVRContext) {
   this.kooKooIVRContext = kooKooIVRContext;
   this.cookies = kooKooIVRContext.cookies();
   this.request = kooKooIVRContext.httpRequest();
   cookies.add(OUTBOX_COMPLETED, Boolean.toString(false));
 }