コード例 #1
0
  @Test
  public void testSearch() {

    String s = "test";
    ci.addComment(u, s);
    assertNotNull(ci.search(u));
  }
コード例 #2
0
  @Test
  public void testSearch2() {

    String s = "test";
    User u1 = new User();
    u1.setUsername("test1");
    u1.setEmail("test1");
    ci.addComment(u, s);
    ci.addComment(u, s);
    ci.addComment(u, s);
    ci.addComment(u, s);
    ci.addComment(u1, s);
    ci.addComment(u1, s);

    assertEquals(4, ci.search(u).size());
    assertEquals(2, ci.search(u1).size());
  }