org.apache.myfaces.extensions.validator.test.base
Class AbstractExValTestCase

java.lang.Object
  extended by org.apache.myfaces.test.base.junit4.AbstractJsfConfigurableMockTestCase
      extended by org.apache.myfaces.extensions.validator.test.base.AbstractExValTestCase
Direct Known Subclasses:
AbstractBeanValidationTestCase, AbstractExValCoreTestCase, AbstractPropertyValidationTestCase, AbstractTrinidadSupportTestCase, SupportForMapPropertyTest

public abstract class AbstractExValTestCase
extends org.apache.myfaces.test.base.junit4.AbstractJsfConfigurableMockTestCase

Abstract ExtVal Test base class, which sets up the JSF environment. If the test overrides any of the setUp() and/or tearDown(), related methods, then those methods need to call the overwitten method to insure a valid test environment.


Field Summary
 
Fields inherited from class org.apache.myfaces.test.base.junit4.AbstractJsfConfigurableMockTestCase
application, config, externalContext, facesContext, facesContextFactory, lifecycle, lifecycleFactory, renderKit, request, response, servletContext, session
 
Constructor Summary
AbstractExValTestCase()
           
 
Method Summary
protected  void addInitializationParameters()
           
protected  void addInitParameter(String key, String value)
           
protected  void assertIdExists(String id)
          Verify the following: id is not null Response is complete Responce contains the id
protected  void assertNavigationBlocked(boolean isBlocked)
           
protected  void checkMessageCount(int expected)
           
protected  void checkMessageCount(String clientId, int expected)
           
protected  void checkMessageSeverities(javax.faces.application.FacesMessage.Severity... severities)
           
protected  void createRequestScopedBean(String name, Object instance)
           
protected  void createValueBinding(javax.faces.component.UIInput uiInput, String name, String expression)
           
protected  ExtValModuleConfiguration[] getCustomConfigObjects()
           
protected  ExtValCoreConfiguration getCustomExtValCoreConfiguration()
           
protected abstract  void invokeStartupListeners()
           
 void reset()
           
protected  void resetExtValContext()
           
protected  void resetTestCase()
           
protected
<T> T
resolveBean(String name, Class<T> targetClass)
           
protected  void setFactories()
           
 void setUp()
          Setup the test environment, including the following: Set the Application Map.
protected  void setUpApplication()
           
protected  void setUpFacesContext()
           
protected  void setUpRenderKit()
           
protected  void setUpServletObjects()
           
protected  void setUpTestCase()
           
 
Methods inherited from class org.apache.myfaces.test.base.junit4.AbstractJsfConfigurableMockTestCase
setUpExternalContext, setUpJSFObjects, setUpLifecycle, setUpView, tearDown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractExValTestCase

public AbstractExValTestCase()
Method Detail

setUpServletObjects

protected void setUpServletObjects()
                            throws Exception
Overrides:
setUpServletObjects in class org.apache.myfaces.test.base.junit4.AbstractJsfConfigurableMockTestCase
Throws:
Exception

setFactories

protected void setFactories()
                     throws Exception
Overrides:
setFactories in class org.apache.myfaces.test.base.junit4.AbstractJsfConfigurableMockTestCase
Throws:
Exception

setUpRenderKit

protected void setUpRenderKit()
                       throws Exception
Overrides:
setUpRenderKit in class org.apache.myfaces.test.base.junit4.AbstractJsfConfigurableMockTestCase
Throws:
Exception

setUpFacesContext

protected void setUpFacesContext()
                          throws Exception
Overrides:
setUpFacesContext in class org.apache.myfaces.test.base.junit4.AbstractJsfConfigurableMockTestCase
Throws:
Exception

setUpApplication

protected void setUpApplication()
                         throws Exception
Overrides:
setUpApplication in class org.apache.myfaces.test.base.junit4.AbstractJsfConfigurableMockTestCase
Throws:
Exception

setUp

public void setUp()
           throws Exception
Setup the test environment, including the following:

Overrides:
setUp in class org.apache.myfaces.test.base.junit4.AbstractJsfConfigurableMockTestCase
Throws:
Exception

setUpTestCase

protected void setUpTestCase()

getCustomExtValCoreConfiguration

protected ExtValCoreConfiguration getCustomExtValCoreConfiguration()

addInitializationParameters

protected void addInitializationParameters()

invokeStartupListeners

protected abstract void invokeStartupListeners()

getCustomConfigObjects

protected ExtValModuleConfiguration[] getCustomConfigObjects()

addInitParameter

protected void addInitParameter(String key,
                                String value)

reset

public void reset()

resetTestCase

protected void resetTestCase()

resetExtValContext

protected void resetExtValContext()

checkMessageCount

protected void checkMessageCount(int expected)

checkMessageCount

protected void checkMessageCount(String clientId,
                                 int expected)

checkMessageSeverities

protected void checkMessageSeverities(javax.faces.application.FacesMessage.Severity... severities)

assertNavigationBlocked

protected void assertNavigationBlocked(boolean isBlocked)

assertIdExists

protected void assertIdExists(String id)
Verify the following:

Parameters:
id - ID to verify

createValueBinding

protected void createValueBinding(javax.faces.component.UIInput uiInput,
                                  String name,
                                  String expression)

createRequestScopedBean

protected void createRequestScopedBean(String name,
                                       Object instance)

resolveBean

protected <T> T resolveBean(String name,
                            Class<T> targetClass)


Copyright © 2008-2010 The Apache Software Foundation. All Rights Reserved.