org.apache.myfaces.test.base.junit4
Class AbstractViewControllerTestCase

java.lang.Object
  extended by org.apache.myfaces.test.base.junit4.AbstractJsfTestCase
      extended by org.apache.myfaces.test.base.junit4.AbstractViewControllerTestCase

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.

Since:
1.0.0

Field Summary
 
Fields inherited from class org.apache.myfaces.test.base.junit4.AbstractJsfTestCase
application, config, externalContext, facesContext, facesContextFactory, lifecycle, lifecycleFactory, renderKit, request, response, servletContext, session
 
Constructor Summary
AbstractViewControllerTestCase()
          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.myfaces.test.base.junit4.AbstractJsfTestCase
setFactories, setUp, setUpApplication, setUpClassloader, setUpExternalContext, setUpFacesContext, setUpJSFObjects, setUpLifecycle, setUpRenderKit, setUpServletObjects, setUpView, tearDown, tearDownClassloader
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractViewControllerTestCase

public AbstractViewControllerTestCase()

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 © 2014 The Apache Software Foundation. All Rights Reserved.