Package java.util

Examples of java.util.ArrayList.containsAll()


        final List r1 = new ArrayList(fel);

        assertEquals(n1.size(), r1.size());
        assertTrue(n1.containsAll(r1));
        assertTrue(r1.containsAll(n1));
    }

    public void testContains() {
        final EventList el = EventLists.eventList();
        prefillWithIntegers(el, 4);
View Full Code Here


        assertTrue(even.containsAll(fel));

        fel.setFilter(ODD_FILTER);

        assertTrue(fel.containsAll(odd));
        assertTrue(odd.containsAll(fel));
    }

    public void testSetFilter() {
        final EventList el = EventLists.eventList();
        prefillWithIntegers(el, 4);
View Full Code Here

        assertTrue(even.containsAll(fel));

        fel.setFilter(ODD_FILTER);

        assertEquals(2, fel.size());
        assertTrue(odd.containsAll(fel));

        fel.setFilter(null);

        assertEquals(4, fel.size());
        assertTrue(fel.containsAll(even));
View Full Code Here

        assertEquals(3, fel.size());
        removed = el.remove(2);
        assertEquals(2, fel.size());
        flel.listChanged(null);
        fel.removeListEventListener(flel);
        assertTrue(even.containsAll(fel));

        el.add(2, removed);

        ListEventListener lel = new ListEventListener() {
            private int count = 0;
View Full Code Here

        el.addAll(l);

        Collections.shuffle(l, new Random(4372));

        assertTrue(l.containsAll(el));
        assertTrue(el.containsAll(l));

        final List sub = new ArrayList(l.subList(50, 100));

        l.removeAll(sub);
View Full Code Here

        el.addAll(l);

        Collections.shuffle(l, new Random(5623));

        assertTrue(l.containsAll(el));
        assertTrue(el.containsAll(l));

        final List sub = new ArrayList(l.subList(50, 100));

        l.retainAll(sub);
View Full Code Here

        assertEquals("values should be empty if HashMap is" +
                     "\nTest: " + test + "\nReal: " + known,
                     empty, values.isEmpty());
        assertTrue("values should contain all HashMap's elements" +
                   "\nTest: " + test + "\nReal: " + known,
                    test.containsAll(known));
        assertTrue("values should contain all HashMap's elements" +
                   "\nTest: " + test + "\nReal: " + known,
                   known.containsAll(test));
        // originally coded to use a HashBag, but now separate jar so...
        for (Iterator it = known.iterator(); it.hasNext();) {
View Full Code Here

          }
          // Going through all the soap:headerfaultS
          faultNames.addAll(findAllHeaderFaults(bindingOperation));
          // If not true that all the wsdl:faultS are bound,
          // the assertion failed
          if (!faultNames.containsAll(
            bindingOperation.getOperation().getFaults().keySet()))
          {
              throw new AssertionFailException("The binding operation \""
                  + bindingOperation.getName() + "\" does not "
                  + "bind all the corresponding wsdl:faultS.");
View Full Code Here

            query.close(col);

            Assert.assertTrue("Bad Employee names, expected:"
                    + expectedNames + " / found: " + foundNames,
                    expectedNames.containsAll(foundNames)
                    && foundNames.containsAll(expectedNames));
        } catch (JDOException e) {
            Exception ie = ExceptionHelper.getNested(e);
            logger.log(BasicLevel.ERROR, "", ie);
            fail(ie.getMessage());
        } finally {
View Full Code Here

            query.close(col);

            Assert.assertTrue("Bad Employee names, expected:"
                    + expectedNames + " / found: " + foundNames,
                    expectedNames.containsAll(foundNames)
                    && foundNames.containsAll(expectedNames));
        } catch (JDOException e) {
            Exception ie = ExceptionHelper.getNested(e);
            logger.log(BasicLevel.ERROR, "", ie);
            fail(ie.getMessage());
        } finally {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.