Exemplo n.º 1
0
  @Test
  public void delete() {
    // Given
    User member = User.find.byId(2L);
    Project project = Project.findByOwnerAndProjectName("yobi", "projectYobi");
    RecentlyVisitedProjects.addNewVisitation(member, project);

    // When
    project.delete();

    // Then
    assertThat(Project.findByOwnerAndProjectName("yobi", "projectYobi")).isNull();
  }
 @After
 public void after() {
   for (RecentlyVisitedProjects visitedProjects : RecentlyVisitedProjects.find.all()) {
     visitedProjects.delete();
   }
 }