@Test void addTest() { final HopscotchCollection<Integer> hopscotchCollection = new HopscotchCollection<>(testVals.size()); testVals.stream().forEach(hopscotchCollection::add); Assert.assertEquals(hopscotchCollection.size(), testVals.size()); Assert.assertTrue(hopscotchCollection.containsAll(testVals)); }
@Test void containsTest() { final HopscotchCollection<Integer> hopscotchCollection = new HopscotchCollection<>(testVals); Assert.assertTrue(hopscotchCollection.containsAll(testVals)); Assert.assertFalse(hopscotchCollection.contains(notInTestVals)); }
@Test void createFromCollectionTest() { final HopscotchCollection<Integer> hopscotchCollection = new HopscotchCollection<>(testVals); Assert.assertEquals(hopscotchCollection.size(), testVals.size()); Assert.assertTrue(hopscotchCollection.containsAll(testVals)); }