Ejemplo n.º 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()]));
 }
Ejemplo n.º 2
0
  @Test
  public void testUniqueSize() {
    addStringsToCollection(bag);

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

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