Ejemplo n.º 1
0
  @Test
  public void shouldReturnUserOnEdit() {
    User user = controller.edit(1L);

    assertThat(user, notNullValue());
    assertThat(user.getId(), equalTo(1L));
  }
Ejemplo n.º 2
0
  @Test
  public void shouldReturnPage() {
    Page<User> paginate = controller.index();

    List<User> list = paginate.getList();
    User user = list.get(0);

    assertThat(paginate, instanceOf(Page.class));
    assertThat(paginate.getPageSize(), equalTo(1));
    assertThat(user.getId(), equalTo(1L));
    assertThat(user.getEmail(), equalTo("Foo"));
  }