Reorder tests, remove TODO as it should be fine imho.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@1475953 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Thomas Neidhart 2013-04-25 20:48:08 +00:00
parent 766d9add03
commit 0c05822544
1 changed files with 10 additions and 11 deletions

View File

@ -37,17 +37,6 @@ public class TreeBagTest<T> extends AbstractSortedBagTest<T> {
return new TreeBag<T>();
}
// TODO: Generics (for example... is this even needed?)
public void testCollections265() {
final Bag<Object> bag = new TreeBag<Object>();
try {
bag.add(new Object());
fail("IllegalArgumentException expected");
} catch(final IllegalArgumentException iae) {
// expected;
}
}
@SuppressWarnings("unchecked")
public SortedBag<T> setupBag() {
final SortedBag<T> bag = makeObject();
@ -58,6 +47,16 @@ public class TreeBagTest<T> extends AbstractSortedBagTest<T> {
return bag;
}
public void testCollections265() {
final Bag<Object> bag = new TreeBag<Object>();
try {
bag.add(new Object());
fail("IllegalArgumentException expected");
} catch(final IllegalArgumentException iae) {
// expected;
}
}
public void testOrdering() {
final Bag<T> bag = setupBag();
assertEquals("Should get elements in correct order", "A", bag.toArray()[0]);