net.sf.sasl.aop.exception.handling
Class ServiceExceptionFirewallAspectTest

java.lang.Object
  extended by net.sf.sasl.aop.exception.handling.ServiceExceptionFirewallAspectTest

public class ServiceExceptionFirewallAspectTest
extends Object

Test cases for the ServiceExceptionFirewallAspect class.

Author:
Philipp Förmer

Nested Class Summary
 class ServiceExceptionFirewallAspectTest.AnotherDummyResponseDTO
          Dummy class for some test cases of the ServiceExceptionFirewallAspectTest
 
Constructor Summary
ServiceExceptionFirewallAspectTest()
           
 
Method Summary
 void setUp()
           
 OneDerivedDummyResponseDTO testCaseHelperMethod()
          Dummy method which is needed for some test cases like testConstructReturnValueSuccess().
 ServiceExceptionFirewallAspectTest.AnotherDummyResponseDTO testCaseHelperMethodTwo()
          Dummy method which is needed for the testConstructReturnValueInstantiationError() test case.
 void testConstructReturnValueInstantiationError()
          Test case for constructReturnValue.
 void testConstructReturnValueNoConfigBean()
          Test case for constructReturnValue.
 void testConstructReturnValueSuccess()
          Test case for constructReturnValue.
 void testInvokeSuccessful()
          Test cases for invoke which test the scenario that the intercepted method does not throw a throwable during execution.
 void testSetConfigBeanListValid()
          Test cases for setConfigBeanList with config bean lists that are valid.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceExceptionFirewallAspectTest

public ServiceExceptionFirewallAspectTest()
Method Detail

setUp

public void setUp()

testInvokeSuccessful

public void testInvokeSuccessful()
                          throws Throwable
Test cases for invoke which test the scenario that the intercepted method does not throw a throwable during execution.

Throws:
Throwable

testSetConfigBeanListValid

public void testSetConfigBeanListValid()
                                throws Exception
Test cases for setConfigBeanList with config bean lists that are valid. The test cases also cover lookupConfigForClass to check if the config beans were put into the lookup map.

Throws:
Exception

testConstructReturnValueSuccess

public void testConstructReturnValueSuccess()
                                     throws Exception
Test case for constructReturnValue. Test if the correct result object is constructed, if there exists a config bean for the return value type of the target method which throwed the throwable.

Throws:
Exception

testConstructReturnValueNoConfigBean

public void testConstructReturnValueNoConfigBean()
                                          throws Exception
Test case for constructReturnValue. Test if null is returned, if no config bean for the return type of the target method which failed could be looked up.

Throws:
Exception

testConstructReturnValueInstantiationError

public void testConstructReturnValueInstantiationError()
                                                throws Exception
Test case for constructReturnValue. Test if null is returned, if the instantiation of the result object failed.

Throws:
Exception

testCaseHelperMethod

public OneDerivedDummyResponseDTO testCaseHelperMethod()
Dummy method which is needed for some test cases like testConstructReturnValueSuccess().


testCaseHelperMethodTwo

public ServiceExceptionFirewallAspectTest.AnotherDummyResponseDTO testCaseHelperMethodTwo()
Dummy method which is needed for the testConstructReturnValueInstantiationError() test case.



Copyright © 2010. All Rights Reserved.