org.apache.shale.test.base
Class AbstractViewControllerTestCase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.apache.shale.test.base.AbstractJsfTestCase
              extended by org.apache.shale.test.base.AbstractViewControllerTestCase
All Implemented Interfaces:
junit.framework.Test

public abstract class AbstractViewControllerTestCase
extends AbstractJsfTestCase

Abstract base class for testing ViewController implementations.

WARNING - If you choose to subclass this class, be sure your setUp() and tearDown() methods call super.setUp() and super.tearDown() respectively, and that you implement your own suite() method that exposes the test methods for your test case.


Field Summary
 
Fields inherited from class org.apache.shale.test.base.AbstractJsfTestCase
application, config, externalContext, facesContext, facesContextFactory, lifecycle, lifecycleFactory, renderKit, request, response, servletContext, session
 
Constructor Summary
AbstractViewControllerTestCase(String name)
          Construct a new instance of this test case.
 
Method Summary
protected  void checkMessageCount(int expected)
          Test that the specified number of messages have been queued on the FacesContext instance, without regard to matching a particular client identifier.
protected  void checkMessageCount(String clientId, int expected)
          Test that the specified number of messages have been queued on the FacesContext instance, for the specified client id.
 
Methods inherited from class org.apache.shale.test.base.AbstractJsfTestCase
setUp, tearDown
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractViewControllerTestCase

public AbstractViewControllerTestCase(String name)

Construct a new instance of this test case.

Parameters:
name - Test case name
Method Detail

checkMessageCount

protected void checkMessageCount(int expected)

Test that the specified number of messages have been queued on the FacesContext instance, without regard to matching a particular client identifier.

Parameters:
expected - The expected number of messages

checkMessageCount

protected void checkMessageCount(String clientId,
                                 int expected)

Test that the specified number of messages have been queued on the FacesContext instance, for the specified client id.

Parameters:
clientId - Client identifier of the component for which to count queued messages
expected - The expected number of messages


Copyright © 2004-2007 Apache Software Foundation. All Rights Reserved.