Clover coverage report -
Coverage timestamp: Thu Jun 22 2006 14:24:50 CEST
file stats: LOC: 215   Methods: 14
NCLOC: 78   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
EBaseSimpleEnvEntry00.java 50% 86.7% 92.9% 87.1%
coverage coverage
 1    /**
 2    * EasyBeans
 3    * Copyright (C) 2006 Bull S.A.S.
 4    * Contact: easybeans@objectweb.org
 5    *
 6    * This library is free software; you can redistribute it and/or
 7    * modify it under the terms of the GNU Lesser General Public
 8    * License as published by the Free Software Foundation; either
 9    * version 2.1 of the License, or any later version.
 10    *
 11    * This library is distributed in the hope that it will be useful,
 12    * but WITHOUT ANY WARRANTY; without even the implied warranty of
 13    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 14    * Lesser General Public License for more details.
 15    *
 16    * You should have received a copy of the GNU Lesser General Public
 17    * License along with this library; if not, write to the Free Software
 18    * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 19    * USA
 20    *
 21    * --------------------------------------------------------------------------
 22    * $Id: EBaseSimpleEnvEntry00.java 434 2006-05-09 12:48:37Z studzine $
 23    * --------------------------------------------------------------------------
 24    */
 25    package org.objectweb.easybeans.tests.common.ejbs.base;
 26   
 27    import static org.objectweb.easybeans.tests.common.helper.ContextHelper.checkSimpleEntry;
 28   
 29    import javax.annotation.Resource;
 30    import javax.ejb.SessionContext;
 31   
 32    /**
 33    * This class is used to test inheritance and the annotation Resource.
 34    * @author Eduardo Studzinski Estima de Castro
 35    * @author Gisele Pinheiro Souza
 36    */
 37    public class EBaseSimpleEnvEntry00 implements ItfSimpleEnvEntry {
 38   
 39    /**
 40    * SessionContext.
 41    */
 42    @Resource
 43    private SessionContext sessionContext;
 44   
 45    /**
 46    * The default value must be injected by the container.
 47    */
 48    @Resource(name = "str00")
 49    private String strInjection;
 50   
 51    /**
 52    * The default value must be injected by the container.
 53    */
 54    @Resource(name = "chr00")
 55    public char chrInjection;
 56   
 57    /**
 58    * The default value must be injected by the container.
 59    */
 60    @Resource(name = "int00")
 61    private int intInjection;
 62   
 63    /**
 64    * Boolean with FALSE value.
 65    */
 66    public boolean bolInjection = false;
 67   
 68    /**
 69    * Property inicialized by an injection.
 70    */
 71    private double dblInjection;
 72   
 73    /**
 74    * Property inicialized by an injection.
 75    */
 76    private byte bteInjection;
 77   
 78    /**
 79    * Property inicialized by an injection.
 80    */
 81    private short shrInjection;
 82   
 83    /**
 84    * Property inicialized by an injection.
 85    */
 86    private long lngInjection;
 87   
 88    /**
 89    * Property inicialized by an injection.
 90    */
 91    private float fltInjection;
 92   
 93    /**
 94    * The default value must be injected by the container.
 95    * @param value information value
 96    */
 97  1 @Resource(name = "dbl00")
 98    public void setDblInjection(final double value) {
 99  1 dblInjection = value;
 100    }
 101   
 102    /**
 103    * The default value must be injected by the container.
 104    * @param value information value
 105    */
 106  1 @Resource(name = "bte00")
 107    private void setBteInjection(final byte value) {
 108  1 bteInjection = value;
 109    }
 110   
 111    /**
 112    * The default value must be injected by the container.
 113    * @param value information value
 114    */
 115  1 @Resource(name = "shr00")
 116    private void setShrInjection(final short value) {
 117  1 shrInjection = value;
 118    }
 119   
 120    /**
 121    * The default value must be injected by the container.
 122    * @param value information value
 123    */
 124  1 @Resource(name = "lng00")
 125    protected void setLngInjection(final long value) {
 126  1 lngInjection = value;
 127    }
 128   
 129    /**
 130    * The default value must be injected by the container. The name must be
 131    * generated by the container: class name/field name.
 132    * @param value information value
 133    */
 134  1 @Resource
 135    void setFltInjection(final float value) {
 136  1 fltInjection = value;
 137    }
 138   
 139    /**
 140    * @see org.objectweb.easybeans.tests.common.ejbs.base.ItfSimpleEnvEntry
 141    */
 142  1 public void checkString00() {
 143  1 checkSimpleEntry(sessionContext, "str00", strInjection, ENTRY_STRING);
 144    }
 145   
 146    /**
 147    * @see org.objectweb.easybeans.tests.common.ejbs.base.ItfSimpleEnvEntry
 148    */
 149  1 @SuppressWarnings("boxing")
 150    public void checkCharacter00() {
 151  1 checkSimpleEntry(sessionContext, "chr00", chrInjection, ENTRY_CHARACTER);
 152    }
 153   
 154    /**
 155    * @see org.objectweb.easybeans.tests.common.ejbs.base.ItfSimpleEnvEntry
 156    */
 157  1 @SuppressWarnings("boxing")
 158    public void checkInteger00() {
 159  1 checkSimpleEntry(sessionContext, "int00", intInjection, ENTRY_INTEGER);
 160    }
 161   
 162    /**
 163    * @see org.objectweb.easybeans.tests.common.ejbs.base.ItfSimpleEnvEntry
 164    */
 165  1 @SuppressWarnings("boxing")
 166    public void checkBoolean00() {
 167  1 if (bolInjection) {
 168  0 throw new IllegalStateException("The value should be false.");
 169    }
 170    }
 171   
 172    /**
 173    * @see org.objectweb.easybeans.tests.common.ejbs.base.ItfSimpleEnvEntry
 174    */
 175  1 @SuppressWarnings("boxing")
 176    public void checkDouble00() {
 177  1 checkSimpleEntry(sessionContext, "dbl00", dblInjection, ENTRY_DOUBLE);
 178    }
 179   
 180    /**
 181    * @see org.objectweb.easybeans.tests.common.ejbs.base.ItfSimpleEnvEntry
 182    */
 183  2 @SuppressWarnings("boxing")
 184    public void checkByte00() {
 185  2 checkSimpleEntry(sessionContext, "bte00", bteInjection, ENTRY_BYTE);
 186    }
 187   
 188    /**
 189    * @see org.objectweb.easybeans.tests.common.ejbs.base.ItfSimpleEnvEntry
 190    */
 191  0 @SuppressWarnings("boxing")
 192    public void checkShort00() {
 193  0 checkSimpleEntry(sessionContext, "shr00", shrInjection, ENTRY_SHORT);
 194    }
 195   
 196    /**
 197    * @see org.objectweb.easybeans.tests.common.ejbs.base.ItfSimpleEnvEntry The
 198    * setter method has protected modifier.
 199    */
 200  1 @SuppressWarnings("boxing")
 201    public void checkLong00() {
 202  1 checkSimpleEntry(sessionContext, "lng00", lngInjection, ENTRY_LONG);
 203    }
 204   
 205    /**
 206    * @see org.objectweb.easybeans.tests.common.ejbs.base.ItfSimpleEnvEntry The
 207    * setter method has package modifier.
 208    */
 209  1 @SuppressWarnings("boxing")
 210    public void checkFloat00() {
 211  1 checkSimpleEntry(sessionContext, EBaseSimpleEnvEntry00.class.getName().toString() + "/" + "fltInjection",
 212    fltInjection, ENTRY_FLOAT);
 213    }
 214   
 215    }