org.objectweb.easybeans.tests.interceptors.business
Class TestClassInterceptor01

java.lang.Object
  extended by org.objectweb.easybeans.tests.interceptors.business.TestClassInterceptor01

public class TestClassInterceptor01
extends java.lang.Object

Verifies if the order to execute the class and method interceptors is correct. The correct order is:

  • Default Interceptor in the order of theirs specification.
  • Interceptor Classes in the order of theirs specification.
  • Interceptor Methods in the order of theirs specification.
  • Interceptors annotated to a business method in the order of theirs specification.

  • The bean used to the test has one interceptor.

    Author:
    Gisele Pinheiro Souza, Eduardo Studzinski Estima de Castro
    Reference:
    JSR220-PROPOSED FINAL - Item:11.3.1
    Requirement:
    Application Server must be running; the bean org.objectweb.easybeans.tests.common.ejbs.stateless.SLSBClassInterceptorTest01.java must be deployed.
    Setup:
    gets the reference of SLSBClassInterceptorTest01

    Field Summary
    private  ItfClassInterceptorTestRemote<java.lang.Integer> clBean
              Bean used to implement the test.
     
    Constructor Summary
    TestClassInterceptor01()
               
     
    Method Summary
     void startUp()
              Creates a bean to be used in the tests.
     void testClassInterCallOrder00()
              Verifies if the interceptors are not executed.
     void testClassInterCallOrder01()
              Verifies if the interceptors are not executed.
     void testClassInterCallOrder02()
              Verifies if the interceptor classes are not executed with the annotation excludeClassInterceptor.
     void testClassInterCallOrder03()
              Verifies if the interceptor classes are not executed with the annotation excludeClassInterceptor.
     void testClassInterCallOrder04()
              Verifies if the interceptor classes are not executed with the annotation excludeClassInterceptor.
     void testClassInterCallOrder05()
              Verifies if the interceptor classes and the interceptor methods work well together, i.e., if they respect the order.
     void testClassInterCallOrder06()
              Verifies if the interceptor classes and the interceptor methods work well together, i.e., if they respect the order.
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     

    Field Detail

    clBean

    private ItfClassInterceptorTestRemote<java.lang.Integer> clBean
    Bean used to implement the test.

    Constructor Detail

    TestClassInterceptor01

    public TestClassInterceptor01()
    Method Detail

    startUp

    public void startUp()
                 throws java.lang.Exception
    Creates a bean to be used in the tests.

    Throws:
    java.lang.Exception - if there is a problem with the bean initialization.

    testClassInterCallOrder00

    public void testClassInterCallOrder00()
    Verifies if the interceptors are not executed.

    Input:
    List with no values inside.
    Output:
    List with two values, the value inserted by the method and the value inserted by the interceptor.

    testClassInterCallOrder01

    public void testClassInterCallOrder01()
    Verifies if the interceptors are not executed.

    Input:
    List with no values inside.
    Output:
    List with two values, the value inserted by the method and the value inserted by the interceptor.

    testClassInterCallOrder02

    public void testClassInterCallOrder02()
    Verifies if the interceptor classes are not executed with the annotation excludeClassInterceptor.

    Input:
    List with no values inside.
    Output:
    List with only one value, the value inserted by the method.

    testClassInterCallOrder03

    public void testClassInterCallOrder03()
    Verifies if the interceptor classes are not executed with the annotation excludeClassInterceptor. Also, this test verify if the annotation doesn't modify the interceptor method execution.

    Input:
    List with no values inside.
    Output:
    List with two values, the value inserted by the method interceptor and the value inserted by the method.

    testClassInterCallOrder04

    public void testClassInterCallOrder04()
    Verifies if the interceptor classes are not executed with the annotation excludeClassInterceptor. Also, this test verify if the annotation doesn't modify many interceptor method executions.

    Input:
    List with no values inside.
    Output:
    List with two values, the value inserted by the method interceptor and the value inserted by the method.

    testClassInterCallOrder05

    public void testClassInterCallOrder05()
    Verifies if the interceptor classes and the interceptor methods work well together, i.e., if they respect the order.

    Input:
    List with no values inside.
    Output:
    List with four values, the values inserted by the method interceptor and the value inserted by the method.

    testClassInterCallOrder06

    public void testClassInterCallOrder06()
    Verifies if the interceptor classes and the interceptor methods work well together, i.e., if they respect the order.

    Input:
    List with no values inside.
    Output:
    List with two values, the values inserted by the method interceptor and the value inserted by the method.