Clover coverage report -
Coverage timestamp: Thu Jul 5 2007 20:02:32 EDT
file stats: LOC: 138   Methods: 13
NCLOC: 86   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.Test;
 26    import junit.framework.TestCase;
 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.impl.CachedType;
 31   
 32    /**
 33    * Basic CachedType test case.
 34    *
 35    * @author Ben Wang
 36    */
 37   
 38    public class CachedTypeTest extends TestCase
 39    {
 40    Log log = LogFactory.getLog(CachedTypeTest.class);
 41   
 42  8 public CachedTypeTest(String name)
 43    {
 44  8 super(name);
 45    }
 46   
 47  8 protected void setUp() throws Exception
 48    {
 49  8 super.setUp();
 50  8 log.info("setUp() ....");
 51    }
 52   
 53  8 protected void tearDown() throws Exception
 54    {
 55  8 super.tearDown();
 56    }
 57   
 58  1 public void testInteger() throws Exception
 59    {
 60  1 CachedType t = new CachedType(int.class);
 61  1 assertTrue("Int ", t.isImmediate());
 62   
 63  1 t = new CachedType(Integer.class);
 64  1 assertTrue("Int ", t.isImmediate());
 65    }
 66   
 67  1 public void testShort() throws Exception
 68    {
 69  1 CachedType t = new CachedType(short.class);
 70  1 assertTrue("Short ", t.isImmediate());
 71   
 72  1 t = new CachedType(Short.class);
 73  1 assertTrue("Short ", t.isImmediate());
 74    }
 75   
 76  1 public void testString() throws Exception
 77    {
 78  1 CachedType t = new CachedType(String.class);
 79  1 assertTrue("String ", t.isImmediate());
 80    }
 81   
 82  1 public void testDouble() throws Exception
 83    {
 84  1 CachedType t = new CachedType(double.class);
 85  1 assertTrue("Double ", t.isImmediate());
 86   
 87  1 t = new CachedType(Double.class);
 88  1 assertTrue("Double ", t.isImmediate());
 89    }
 90   
 91  1 public void testChar() throws Exception
 92    {
 93  1 CachedType t = new CachedType(Character.class);
 94  1 assertTrue("Character ", t.isImmediate());
 95   
 96  1 t = new CachedType(Character.class);
 97  1 assertTrue("Character ", t.isImmediate());
 98    }
 99   
 100  1 public void testBoolean() throws Exception
 101    {
 102  1 CachedType t = new CachedType(boolean.class);
 103  1 assertTrue("Boolean ", t.isImmediate());
 104   
 105  1 t = new CachedType(Boolean.class);
 106  1 assertTrue("Boolean ", t.isImmediate());
 107    }
 108   
 109  1 public void testLong() throws Exception
 110    {
 111  1 CachedType t = new CachedType(long.class);
 112  1 assertTrue("Long ", t.isImmediate());
 113   
 114  1 t = new CachedType(Long.class);
 115  1 assertTrue("Long ", t.isImmediate());
 116    }
 117   
 118  1 public void testByte() throws Exception
 119    {
 120  1 CachedType t = new CachedType(byte.class);
 121  1 assertTrue("Byte ", t.isImmediate());
 122   
 123  1 t = new CachedType(Short.class);
 124  1 assertTrue("Byte ", t.isImmediate());
 125    }
 126   
 127  1 public static Test suite() throws Exception
 128    {
 129  1 return new TestSuite(CachedTypeTest.class);
 130    }
 131   
 132   
 133  0 public static void main(String[] args) throws Exception
 134    {
 135  0 junit.textui.TestRunner.run(suite());
 136    }
 137   
 138    }