コード例 #1
0
 @Test
 public void testToArrayWithParam() {
   addStringsToCollection(bag);
   Set<String> expected = new HashSet<>();
   addStringsToCollection(expected);
   Assert.assertEquals(expected.toArray(), bag.toArray(new Object[bag.uniqueSize()]));
 }
コード例 #2
0
  @Test
  public void testUniqueSize() {
    addStringsToCollection(bag);

    List<String> expected = new ArrayList<>();
    addStringsToCollection(expected);

    Assert.assertEquals(expected.size(), bag.uniqueSize());
  }