[jboss-cvs] JBossCache/tests/functional/org/jboss/cache/pojo ...
Jason Thomas Greene
jgreene at jboss.com
Tue Jul 17 23:01:49 EDT 2007
User: jgreene
Date: 07/07/17 23:01:49
Modified: tests/functional/org/jboss/cache/pojo EnumTest.java
Log:
Remove 'final' field replication support, which was broken anyway
Fix enum test
Revision Changes Path
1.4 +6 -11 JBossCache/tests/functional/org/jboss/cache/pojo/EnumTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: EnumTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/pojo/EnumTest.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- EnumTest.java 23 May 2007 10:28:49 -0000 1.3
+++ EnumTest.java 18 Jul 2007 03:01:49 -0000 1.4
@@ -25,11 +25,13 @@
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
+
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jboss.cache.config.Configuration.CacheMode;
import org.jboss.cache.factories.UnitTestCacheConfigurationFactory;
import org.jboss.cache.pojo.test.EnumPlanet;
+import org.jboss.cache.pojo.test.Person;
/**
* Basic PojoCache test case for Enum.
@@ -66,17 +68,11 @@
public void testSimple() throws Exception
{
log.info("testSimple() ....");
+ cache_.attach("/enum", EnumPlanet.EARTH);
+ EnumPlanet ep = (EnumPlanet) cache1_.find("/enum");
- double earthWeight = 165;
- double mass = earthWeight / EnumPlanet.EARTH.surfaceGravity();
-
- cache_.attach("enum", EnumPlanet.EARTH);
-
- EnumPlanet ep = (EnumPlanet) cache1_.find("enum");
-
- EnumPlanet.EARTH.setMass(7.0e+24);
-
- assertEquals("Earth mass ", EnumPlanet.EARTH.mass(), ep.mass());
+ // Enum's use read resolve
+ assertSame(ep, EnumPlanet.EARTH);
}
public static Test suite() throws Exception
@@ -89,5 +85,4 @@
{
junit.textui.TestRunner.run(suite());
}
-
}
More information about the jboss-cvs-commits
mailing list