Clover coverage report -
Coverage timestamp: Sun Feb 29 2004 21:42:04 CET
file stats: LOC: 103   Methods: 8
NCLOC: 60   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
AbstractPicoAllInTheFamilyTestCase.java - 100% 100% 100%
coverage
 1   
 /* ====================================================================
 2   
 The Jicarilla Software License
 3   
 
 4   
 Copyright (c) 2003 Leo Simons.
 5   
 All rights reserved.
 6   
 
 7   
 Permission is hereby granted, free of charge, to any person obtaining
 8   
 a copy of this software and associated documentation files (the
 9   
 "Software"), to deal in the Software without restriction, including
 10   
 without limitation the rights to use, copy, modify, merge, publish,
 11   
 distribute, sublicense, and/or sell copies of the Software, and to
 12   
 permit persons to whom the Software is furnished to do so, subject to
 13   
 the following conditions:
 14   
 
 15   
 The above copyright notice and this permission notice shall be
 16   
 included in all copies or substantial portions of the Software.
 17   
 
 18   
 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 19   
 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 20   
 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 21   
 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
 22   
 CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
 23   
 TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 24   
 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 25   
 ==================================================================== */
 26   
 package org.jicarilla.container.test.integration.pico;
 27   
 
 28   
 import org.jicarilla.container.tck.AbstractAllInTheFamilyTestCase;
 29   
 import org.jicarilla.container.tck.components.interfaces.Bart;
 30   
 import org.jicarilla.container.tck.components.interfaces.Homer;
 31   
 import org.jicarilla.container.tck.components.interfaces.Lisa;
 32   
 import org.jicarilla.container.tck.components.interfaces.Maggie;
 33   
 import org.jicarilla.container.tck.components.interfaces.Marge;
 34   
 import org.jicarilla.container.tck.components.interfaces.Script;
 35   
 import org.jicarilla.container.tck.components.type3.rich.AllInTheFamilyScript;
 36   
 import org.jicarilla.container.tck.components.type3.rich.BartImpl;
 37   
 import org.jicarilla.container.tck.components.type3.rich.HomerImpl;
 38   
 import org.jicarilla.container.tck.components.type3.rich.LisaImpl;
 39   
 import org.jicarilla.container.tck.components.type3.rich.MaggieImpl;
 40   
 import org.jicarilla.container.tck.components.type3.rich.MargeImpl;
 41   
 import org.picocontainer.MutablePicoContainer;
 42   
 
 43   
 /**
 44   
  * 
 45   
  *
 46   
  * @author <a href="lsimons at jicarilla dot org">Leo Simons</a>
 47   
  * @version $Id: AbstractPicoAllInTheFamilyTestCase.java,v 1.1 2004/01/18 16:01:45 lsimons Exp $
 48   
  */
 49   
 public abstract class AbstractPicoAllInTheFamilyTestCase
 50   
         extends AbstractAllInTheFamilyTestCase
 51   
 {
 52   
     protected MutablePicoContainer pc;
 53   
 
 54   
     protected abstract MutablePicoContainer getContainer();
 55   
 
 56  20
     public void setUp() throws Exception
 57   
     {
 58  20
         pc = getContainer();
 59  20
         doPopulate();
 60  20
         super.setUp();
 61   
     }
 62   
 
 63  20
     protected void doPopulate()
 64   
     {
 65  20
         pc.registerComponentImplementation( HomerImpl.class );
 66  20
         pc.registerComponentImplementation( MargeImpl.class );
 67  20
         pc.registerComponentImplementation( BartImpl.class );
 68  20
         pc.registerComponentImplementation( LisaImpl.class );
 69  20
         pc.registerComponentImplementation( MaggieImpl.class );
 70  20
         pc.registerComponentImplementation( AllInTheFamilyScript.class );
 71   
     }
 72   
 
 73  20
     protected AllInTheFamilyScript getScript()
 74   
     {
 75  20
         return (AllInTheFamilyScript)pc.getComponentInstance( Script.class );
 76   
     }
 77   
 
 78  20
     protected Homer getHomer()
 79   
     {
 80  20
         return (Homer)pc.getComponentInstance( Homer.class );
 81   
     }
 82   
 
 83  20
     protected Marge getMarge()
 84   
     {
 85  20
         return (Marge)pc.getComponentInstance( Marge.class );
 86   
     }
 87   
 
 88  20
     protected Bart getBart()
 89   
     {
 90  20
         return (Bart)pc.getComponentInstance( Bart.class );
 91   
     }
 92   
 
 93  20
     protected Lisa getLisa()
 94   
     {
 95  20
         return (Lisa)pc.getComponentInstance( Lisa.class );
 96   
     }
 97   
 
 98  20
     protected Maggie getMaggie()
 99   
     {
 100  20
         return (Maggie)pc.getComponentInstance( Maggie.class );
 101   
     }
 102   
 }
 103