Beispiel #1
0
  @Test
  public void save() {
    // Given
    Integer count = likeDao.count();

    // When
    likeDao.save(createLike());

    // Then
    assertThat(likeDao.count(), is(count + 1));
  }
Beispiel #2
0
  @Test
  public void delete() {
    // Given
    Like like = createLike();
    likeDao.save(like);
    Integer count = likeDao.count();

    // When
    Map<String, Object> map = new HashMap<String, Object>();
    map.put("providerUserId", providerUserId);
    map.put("documentId", documentId);
    likeDao.delete(map);

    // Then
    assertThat(likeDao.count(), is(count - 1));
  }