コード例 #1
0
 @Test
 public void updateIVRContextOnExecute() {
   CallStateCommand callStateCommand =
       new CallStateCommand(CallState.ALL_TREES_COMPLETED, tamaivrContextFactory);
   callStateCommand.execute(kooKooIVRContext);
   assertEquals(CallState.ALL_TREES_COMPLETED, context.callState());
 }
コード例 #2
0
  @Test
  public void shouldResetContextWhenRequested() {
    context.callState(CallState.ALL_TREES_COMPLETED);
    CallStateCommand callStateCommand = new CallStateCommand(tamaivrContextFactory);
    callStateCommand.execute(kooKooIVRContext);

    verify(cookies).add(TAMAIVRContext.DO_NOT_PROMPT_FOR_HANG_UP, "true");
    assertEquals(CallState.MAIN_MENU, context.callState());
  }