Clover coverage report -
Coverage timestamp: Thu Jun 22 2006 14:24:50 CEST
file stats: LOC: 144   Methods: 10
NCLOC: 60   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
TestSFMethodInterceptor.java - 100% 100% 100%
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: TestSFMethodInterceptor.java 703 2006-06-21 14:33:25Z studzine $
 23    * --------------------------------------------------------------------------
 24    */
 25    package org.objectweb.easybeans.tests.interceptors.business.stateful.containermanaged;
 26   
 27    import static org.objectweb.easybeans.tests.common.helper.EJBHelper.getBeanRemoteInstance;
 28   
 29    import org.objectweb.easybeans.tests.common.ejbs.base.ItfMethodInterceptor;
 30    import org.objectweb.easybeans.tests.common.ejbs.stateful.containermanaged.SFSBMethodInterceptorTest;
 31    import org.objectweb.easybeans.tests.interceptors.business.base.BaseMethodInterceptor;
 32    import org.testng.annotations.Configuration;
 33    import org.testng.annotations.Test;
 34   
 35    /**
 36    * Verifies if the order to execute the method interceptors is
 37    * correct. The correct order is:
 38    * <li>Default Interceptor in the order of theirs specification.</li>
 39    * <li>Interceptor Classes in the order of theirs specification.</li>
 40    * <li>Interceptor Methods in the order of theirs specification.</li>
 41    * <li>Interceptors annotated to a business method in the order of theirs specification.</li>
 42    * <br> The bean used to the test has one interceptor.
 43    * @reference JSR220-PROPOSED FINAL - Item:11.7
 44    * @requirement Application Server must be running; the bean
 45    * org.objectweb.easybeans.tests.common.ejbs.stateless.containermanaged.SLSBMethodInterceptorTest.java
 46    * must be deployed.
 47    * @setup gets the reference of SFSBMethodInterceptorTest
 48    * @author Eduardo Studzinski Estima de Castro
 49    * @author Gisele Pinheiro Souza
 50    */
 51    public class TestSFMethodInterceptor extends BaseMethodInterceptor{
 52   
 53    /**
 54    * Gets bean instance used in the tests.
 55    * @throws Exception if there is a problem with the bean initialization.
 56    */
 57  10 @SuppressWarnings("unchecked")
 58    @Configuration(beforeTestMethod = true)
 59    public void startUp() throws Exception {
 60  10 ItfMethodInterceptor<Integer> bean = getBeanRemoteInstance(SFSBMethodInterceptorTest.class, ItfMethodInterceptor.class);
 61  9 super.setBean(bean);
 62    }
 63   
 64    /**
 65    * @see org.objectweb.easybeans.tests.interceptors.business.base.BaseMethodInterceptor
 66    */
 67  1 @Override
 68    @Test(groups = {"withoutInterceptor"})
 69    public void interceptorMethodTest00() {
 70  1 super.interceptorMethodTest00();
 71    }
 72   
 73    /**
 74    * @see org.objectweb.easybeans.tests.interceptors.business.base.BaseMethodInterceptor
 75    */
 76  1 @Override
 77    @Test(groups = {"withInterceptor"})
 78    public void interceptorMethodTest02() {
 79  1 super.interceptorMethodTest02();
 80    }
 81   
 82    /**
 83    * @see org.objectweb.easybeans.tests.interceptors.business.base.BaseMethodInterceptor
 84    */
 85  1 @Override
 86    @Test(groups = {"withInterceptor"})
 87    public void interceptorMethodTest03() {
 88  1 super.interceptorMethodTest03();
 89    }
 90   
 91    /**
 92    * @see org.objectweb.easybeans.tests.interceptors.business.base.BaseMethodInterceptor
 93    */
 94  1 @Override
 95    @Test(groups = {"withInterceptor", "withInheritance"})
 96    public void interceptorMethodTest04() {
 97  1 super.interceptorMethodTest04();
 98    }
 99   
 100    /**
 101    * @see org.objectweb.easybeans.tests.interceptors.business.base.BaseMethodInterceptor
 102    */
 103  1 @Override
 104    @Test(groups = {"withInterceptor", "withInheritance"})
 105    public void interceptorMethodTest05() {
 106  1 super.interceptorMethodTest05();
 107    }
 108   
 109    /**
 110    * @see org.objectweb.easybeans.tests.interceptors.business.base.BaseMethodInterceptor
 111    */
 112  1 @Override
 113    @Test(groups = {"withInterceptor"})
 114    public void interceptorMethodTest06() {
 115  1 super.interceptorMethodTest06();
 116    }
 117   
 118    /**
 119    * @see org.objectweb.easybeans.tests.interceptors.business.base.BaseMethodInterceptor
 120    */
 121  1 @Override
 122    @Test(groups = {"withInterceptor"})
 123    public void interceptorMethodTest07() {
 124  1 super.interceptorMethodTest07();
 125    }
 126   
 127    /**
 128    * @see org.objectweb.easybeans.tests.interceptors.business.base.BaseMethodInterceptor
 129    */
 130  1 @Override
 131    @Test(groups = {"withInterceptor", "withInheritance"})
 132    public void interceptorMethodTest08() {
 133  1 super.interceptorMethodTest08();
 134    }
 135   
 136    /**
 137    * @see org.objectweb.easybeans.tests.interceptors.business.base.BaseMethodInterceptor
 138    */
 139  1 @Override
 140    @Test(groups = {"withInterceptor", "withInheritance"})
 141    public void interceptorMethodTest09() {
 142  1 super.interceptorMethodTest09();
 143    }
 144    }