1 22 23 package org.jboss.cache.pojo; 24 25 import junit.framework.TestCase; 26 import junit.framework.Test; 27 import junit.framework.TestSuite; 28 import org.apache.commons.logging.Log; 29 import org.apache.commons.logging.LogFactory; 30 import org.jboss.cache.pojo.test.Person; 31 import org.jboss.cache.pojo.test.Address; 32 import org.jboss.cache.pojo.test.Student; 33 import org.jboss.aop.proxy.ClassProxy; 34 35 import java.util.List ; 36 import java.util.Map ; 37 import java.util.HashMap ; 38 import java.util.ArrayList ; 39 import java.util.Set ; 40 import java.util.HashSet ; 41 42 47 48 public class CachedTypeTest extends TestCase 49 { 50 Log log = LogFactory.getLog(CachedTypeTest.class); 51 52 public CachedTypeTest(String name) 53 { 54 super(name); 55 } 56 57 protected void setUp() throws Exception 58 { 59 super.setUp(); 60 log.info("setUp() ...."); 61 } 62 63 protected void tearDown() throws Exception 64 { 65 super.tearDown(); 66 } 67 68 public void testInteger() throws Exception 69 { 70 CachedType t = new CachedType(int.class); 71 assertTrue("Int ", t.isImmediate()); 72 73 t = new CachedType(Integer .class); 74 assertTrue("Int ", t.isImmediate()); 75 } 76 77 public void testShort() throws Exception 78 { 79 CachedType t = new CachedType(short.class); 80 assertTrue("Short ", t.isImmediate()); 81 82 t = new CachedType(Short .class); 83 assertTrue("Short ", t.isImmediate()); 84 } 85 86 public void testString() throws Exception 87 { 88 CachedType t = new CachedType(String .class); 89 assertTrue("String ", t.isImmediate()); 90 } 91 92 public void testDouble() throws Exception 93 { 94 CachedType t = new CachedType(double.class); 95 assertTrue("Double ", t.isImmediate()); 96 97 t = new CachedType(Double .class); 98 assertTrue("Double ", t.isImmediate()); 99 } 100 101 public void testChar() throws Exception 102 { 103 CachedType t = new CachedType(Character .class); 104 assertTrue("Character ", t.isImmediate()); 105 106 t = new CachedType(Character .class); 107 assertTrue("Character ", t.isImmediate()); 108 } 109 110 public void testBoolean() throws Exception 111 { 112 CachedType t = new CachedType(boolean.class); 113 assertTrue("Boolean ", t.isImmediate()); 114 115 t = new CachedType(Boolean .class); 116 assertTrue("Boolean ", t.isImmediate()); 117 } 118 119 public void testLong() throws Exception 120 { 121 CachedType t = new CachedType(long.class); 122 assertTrue("Long ", t.isImmediate()); 123 124 t = new CachedType(Long .class); 125 assertTrue("Long ", t.isImmediate()); 126 } 127 128 public void testByte() throws Exception 129 { 130 CachedType t = new CachedType(byte.class); 131 assertTrue("Byte ", t.isImmediate()); 132 133 t = new CachedType(Short .class); 134 assertTrue("Byte ", t.isImmediate()); 135 } 136 137 public static Test suite() throws Exception 138 { 139 return new TestSuite(CachedTypeTest.class); 140 } 141 142 143 public static void main(String [] args) throws Exception 144 { 145 junit.textui.TestRunner.run(suite()); 146 } 147 148 } 149 | Popular Tags |