Clover coverage report -
Coverage timestamp: Wed Jan 31 2007 15:38:53 EST
file stats: LOC: 148   Methods: 13
NCLOC: 95   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
CachedTypeTest.java - 97.2% 92.3% 95.9%
coverage coverage
 1    /*
 2    * JBoss, Home of Professional Open Source.
 3    * Copyright 2006, Red Hat Middleware LLC, and individual contributors
 4    * as indicated by the @author tags. See the copyright.txt file in the
 5    * distribution for a full listing of individual contributors.
 6    *
 7    * This is free software; you can redistribute it and/or modify it
 8    * under the terms of the GNU Lesser General Public License as
 9    * published by the Free Software Foundation; either version 2.1 of
 10    * the License, or (at your option) any later version.
 11    *
 12    * This software is distributed in the hope that it will be useful,
 13    * but WITHOUT ANY WARRANTY; without even the implied warranty of
 14    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 15    * Lesser General Public License for more details.
 16    *
 17    * You should have received a copy of the GNU Lesser General Public
 18    * License along with this software; if not, write to the Free
 19    * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 20    * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
 21    */
 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    /**
 43    * Basic CachedType test case.
 44    *
 45    * @author Ben Wang
 46    */
 47   
 48    public class CachedTypeTest extends TestCase
 49    {
 50    Log log = LogFactory.getLog(CachedTypeTest.class);
 51   
 52  16 public CachedTypeTest(String name)
 53    {
 54  16 super(name);
 55    }
 56   
 57  16 protected void setUp() throws Exception
 58    {
 59  16 super.setUp();
 60  16 log.info("setUp() ....");
 61    }
 62   
 63  16 protected void tearDown() throws Exception
 64    {
 65  16 super.tearDown();
 66    }
 67   
 68  2 public void testInteger() throws Exception
 69    {
 70  2 CachedType t = new CachedType(int.class);
 71  2 assertTrue("Int ", t.isImmediate());
 72   
 73  2 t = new CachedType(Integer.class);
 74  2 assertTrue("Int ", t.isImmediate());
 75    }
 76   
 77  2 public void testShort() throws Exception
 78    {
 79  2 CachedType t = new CachedType(short.class);
 80  2 assertTrue("Short ", t.isImmediate());
 81   
 82  2 t = new CachedType(Short.class);
 83  2 assertTrue("Short ", t.isImmediate());
 84    }
 85   
 86  2 public void testString() throws Exception
 87    {
 88  2 CachedType t = new CachedType(String.class);
 89  2 assertTrue("String ", t.isImmediate());
 90    }
 91   
 92  2 public void testDouble() throws Exception
 93    {
 94  2 CachedType t = new CachedType(double.class);
 95  2 assertTrue("Double ", t.isImmediate());
 96   
 97  2 t = new CachedType(Double.class);
 98  2 assertTrue("Double ", t.isImmediate());
 99    }
 100   
 101  2 public void testChar() throws Exception
 102    {
 103  2 CachedType t = new CachedType(Character.class);
 104  2 assertTrue("Character ", t.isImmediate());
 105   
 106  2 t = new CachedType(Character.class);
 107  2 assertTrue("Character ", t.isImmediate());
 108    }
 109   
 110  2 public void testBoolean() throws Exception
 111    {
 112  2 CachedType t = new CachedType(boolean.class);
 113  2 assertTrue("Boolean ", t.isImmediate());
 114   
 115  2 t = new CachedType(Boolean.class);
 116  2 assertTrue("Boolean ", t.isImmediate());
 117    }
 118   
 119  2 public void testLong() throws Exception
 120    {
 121  2 CachedType t = new CachedType(long.class);
 122  2 assertTrue("Long ", t.isImmediate());
 123   
 124  2 t = new CachedType(Long.class);
 125  2 assertTrue("Long ", t.isImmediate());
 126    }
 127   
 128  2 public void testByte() throws Exception
 129    {
 130  2 CachedType t = new CachedType(byte.class);
 131  2 assertTrue("Byte ", t.isImmediate());
 132   
 133  2 t = new CachedType(Short.class);
 134  2 assertTrue("Byte ", t.isImmediate());
 135    }
 136   
 137  2 public static Test suite() throws Exception
 138    {
 139  2 return new TestSuite(CachedTypeTest.class);
 140    }
 141   
 142   
 143  0 public static void main(String[] args) throws Exception
 144    {
 145  0 junit.textui.TestRunner.run(suite());
 146    }
 147   
 148    }