[jboss-cvs] JBossCache/tests/functional/org/jboss/cache ...
Manik Surtani
msurtani at jboss.com
Wed Oct 11 06:02:07 EDT 2006
User: msurtani
Date: 06/10/11 06:02:07
Modified: tests/functional/org/jboss/cache FqnTest.java
Log:
* Removed ExtendedCacheLoader base test
* Merged store and load tests into CacheLoaderTestBase
* Fixed bug in Fqn.getFqnChild(), added better javadocs and unit tests
Revision Changes Path
1.15 +22 -1 JBossCache/tests/functional/org/jboss/cache/FqnTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: FqnTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/FqnTest.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- FqnTest.java 6 Sep 2006 15:31:01 -0000 1.14
+++ FqnTest.java 11 Oct 2006 10:02:07 -0000 1.15
@@ -20,7 +20,7 @@
* Tests {@link Fqn}.
*
* @author <a href="mailto:bela at jboss.org">Bela Ban</a> May 9, 2003
- * @version $Revision: 1.14 $
+ * @version $Revision: 1.15 $
*/
public class FqnTest extends TestCase
{
@@ -328,6 +328,27 @@
assertFalse(cache.hasChild(f));
}
+ public void testGetChildFqn()
+ {
+ Fqn f = Fqn.fromString("/one/two/three");
+
+ // calling getChild with index of '2' should result in "/one/two"
+ assertEquals(Fqn.fromString("/one/two"), f.getFqnChild(2));
+ assertEquals(Fqn.fromString("/one"), f.getFqnChild(1));
+ assertEquals(Fqn.fromString("/one/two/three"), f.getFqnChild(3));
+ try
+ {
+ f.getFqnChild(4);
+ fail("Should have barfed");
+
+ }
+ catch (IndexOutOfBoundsException e)
+ {
+ // this is expected
+ }
+
+ }
+
Fqn marshalAndUnmarshal(Fqn fqn) throws Exception
{
More information about the jboss-cvs-commits
mailing list