ch.elca.el4j.tests.services.exceptionhandler
Class ContextExceptionHandlerTest

java.lang.Object
  extended by ch.elca.el4j.tests.services.exceptionhandler.ContextExceptionHandlerTest

public class ContextExceptionHandlerTest
extends Object

This class tests the context exception handler.

Author:
Andreas Bur (ABU)
File-location:
ContextExceptionHandlerTest
Last check-in date:
2009-08-04 13:59:45 +0200 (Di, 04. Aug 2009) by swismer for revision 3873

Field Summary
private  A m_a
          The bean that is guarded by the security facade.
private  ApplicationContext m_appContext
          The application context.
 
Constructor Summary
ContextExceptionHandlerTest()
          Default constructor.
 
Method Summary
private  void step(int call, int expectedGuiCalls, int expectedBatchCalls)
          Performs a division operation and checks whether the correct method was invoked.
 void testContextSemantics()
          Tests the context semantics.
 void testMissingContext()
          Tests whether the situation with a missing context is handled correclty.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_appContext

private ApplicationContext m_appContext
The application context.


m_a

private A m_a
The bean that is guarded by the security facade.

Constructor Detail

ContextExceptionHandlerTest

public ContextExceptionHandlerTest()
Default constructor.

Method Detail

testContextSemantics

public void testContextSemantics()
Tests the context semantics. This test has to be driven manually. First a dialogue, then a log entry with stack trace and finally, again a dialogue is printed to the standard out.


testMissingContext

public void testMissingContext()
Tests whether the situation with a missing context is handled correclty.


step

private void step(int call,
                  int expectedGuiCalls,
                  int expectedBatchCalls)
Performs a division operation and checks whether the correct method was invoked.

Parameters:
call - The call's number used for displaying assertion failures.
expectedGuiCalls - The expected number of GUI error handling code invocations.
expectedBatchCalls - The expected number of batch error handling code invocations.


Copyright © 2005-2011 ELCA. All Rights Reserved.