Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'common/tests/org.eclipse.jpt.common.utility.tests/src/org/eclipse/jpt/common/utility/tests/internal/BagTests.java')
-rw-r--r--common/tests/org.eclipse.jpt.common.utility.tests/src/org/eclipse/jpt/common/utility/tests/internal/BagTests.java82
1 files changed, 0 insertions, 82 deletions
diff --git a/common/tests/org.eclipse.jpt.common.utility.tests/src/org/eclipse/jpt/common/utility/tests/internal/BagTests.java b/common/tests/org.eclipse.jpt.common.utility.tests/src/org/eclipse/jpt/common/utility/tests/internal/BagTests.java
deleted file mode 100644
index e018dfaeea..0000000000
--- a/common/tests/org.eclipse.jpt.common.utility.tests/src/org/eclipse/jpt/common/utility/tests/internal/BagTests.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0, which accompanies this distribution
- * and is available at http://www.eclipse.org/legal/epl-v10.html.
- *
- * Contributors:
- * Oracle - initial API and implementation
- ******************************************************************************/
-package org.eclipse.jpt.common.utility.tests.internal;
-
-import junit.framework.TestCase;
-
-import org.eclipse.jpt.common.utility.internal.Bag;
-import org.eclipse.jpt.common.utility.internal.HashBag;
-
-@SuppressWarnings("nls")
-public class BagTests extends TestCase {
-
- public BagTests(String name) {
- super(name);
- }
-
- public void testEmptyBag_iterator() throws Exception {
- assertFalse(Bag.Empty.instance().iterator().hasNext());
- }
-
- public void testEmptyBag_size() throws Exception {
- assertEquals(0, Bag.Empty.instance().size());
- }
-
- public void testEmptyBag_uniqueIterator() throws Exception {
- assertFalse(Bag.Empty.instance().uniqueIterator().hasNext());
- }
-
- public void testEmptyBag_uniqueCount() throws Exception {
- assertEquals(0, Bag.Empty.instance().uniqueCount());
- }
-
- public void testEmptyBag_count() throws Exception {
- assertEquals(0, Bag.Empty.instance().count("foo"));
- }
-
- public void testEmptyBag_entries() throws Exception {
- assertFalse(Bag.Empty.instance().entries().hasNext());
- }
-
- public void testEmptyBag_remove() throws Exception {
- assertFalse(Bag.Empty.instance().remove("foo", 3));
- }
-
- public void testEmptyBag_add() throws Exception {
- boolean exCaught = false;
- try {
- Bag.Empty.instance().add("foo", 3);
- fail();
- } catch (UnsupportedOperationException ex) {
- exCaught = true;
- }
- assertTrue(exCaught);
- }
-
- public void testEmptyBag_equals() throws Exception {
- assertTrue(Bag.Empty.instance().equals(Bag.Empty.instance()));
- assertFalse(Bag.Empty.instance().equals("foo"));
-
- Bag<Object> bag = new HashBag<Object>();
- assertTrue(Bag.Empty.instance().equals(bag));
- bag.add("foo");
- assertFalse(Bag.Empty.instance().equals(bag));
- }
-
- public void testEmptyBag_hashCode() throws Exception {
- assertEquals(0, Bag.Empty.instance().hashCode());
- }
-
- public void testEmptyBag_serialization() throws Exception {
- Bag<?> xxx = TestTools.serialize(Bag.Empty.instance());
- assertSame(Bag.Empty.instance(), xxx);
- }
-
-}

Back to the top