コード例 #1
0
  @Test
  public void selectAll3() throws Exception {
    // fail("Not yet implemented");
    User user = new User();
    user.setUserId(1);
    user.setUserPower(2);

    List<OperationLog> list = new ArrayList();
    OperationLog operationLog = new OperationLog();
    list.add(operationLog);
    list.add(operationLog);

    userService = mock(UserService.class);
    operationLogController.setUserService(userService);
    when(userService.findUserById(1)).thenReturn(user);

    operationLogService = mock(OperationLogService.class);
    operationLogController.setOperationLogService(operationLogService);
    when(operationLogService.selectAll()).thenReturn(list);

    operationLogController.selectAll(1, 1, 1, request, response);
    assertEquals("false", operationLogController.getBmp());
  }
コード例 #2
0
 @Test
 public void selectAll1() {
   // fail("Not yet implemented");
   operationLogController.selectAll(1, 1, 1, request, response);
   assertEquals("false", operationLogController.getBmp());
 }