[jboss-cvs] JBossCache/tests/functional/org/jboss/cache/util/concurrent ...
Elias Ross
genman at noderunner.net
Thu May 24 02:19:52 EDT 2007
User: genman
Date: 07/05/24 02:19:52
Added: tests/functional/org/jboss/cache/util/concurrent
ConcurrentHashSetTest.java
Log:
Add required impl for equals, hashCode
Revision Changes Path
1.1 date: 2007/05/24 06:19:52; author: genman; state: Exp;JBossCache/tests/functional/org/jboss/cache/util/concurrent/ConcurrentHashSetTest.java
Index: ConcurrentHashSetTest.java
===================================================================
package org.jboss.cache.util.concurrent;
import java.util.HashSet;
import java.util.Set;
import org.jboss.cache.util.concurrent.ConcurrentHashSet;
import junit.framework.TestCase;
public class ConcurrentHashSetTest extends TestCase
{
String foo = "foo";
public void testEqualsHashCodeString() {
Set<String> s = new ConcurrentHashSet<String>();
Set<String> s2 = new HashSet<String>();
assertTrue(s.add(foo));
s2.add(foo);
assertTrue(s.contains(foo));
assertEquals(s, s2);
assertEquals(s.hashCode(), s2.hashCode());
assertEquals(s.toString(), s2.toString());
assertFalse(s.add(foo));
assertTrue(s.remove(foo));
}
}
More information about the jboss-cvs-commits
mailing list