예제 #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());
  }