myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pavitra Subramaniam (JIRA)" <>
Subject [jira] Created: (TRINIDAD-1861) Add implementations for getCurrentPhaseId()/setCurrentPhaseId() to MockFacesContext12
Date Thu, 22 Jul 2010 22:35:53 GMT
Add implementations for getCurrentPhaseId()/setCurrentPhaseId() to MockFacesContext12

                 Key: TRINIDAD-1861
             Project: MyFaces Trinidad
          Issue Type: Bug
          Components: Build
    Affects Versions: 2.0.0-alpha-2
         Environment: Windows 7, JSF 2
            Reporter: Pavitra Subramaniam

>From Andy Schwartz:

The Trinidad unit tests use Shale Test. Shale Test's mock objects are stuck back on JSF 1.1
We work around this by providing our own subclasses of some of these mock objects.
For the FacesContext mock object, we use Trinidad's org.apache.myfaces.trinidadbuild.test.MockFacesContext12.
MockFacesContext12 adds implementations for methods added in JSF 1.2 + 2.0.

We missed two methods:

- getCurrentPhaseId()
- setCurrentPhaseId()

Since we do not implement these methods, we end up inheriting the base implementations provided
by javax.faces.context.FacesContext.
The default implementations provided by FacesContext throw UnsupportedOperationExceptions.
The fix is to add implementations for getCurrentPhaseId()/setCurrentPhaseId() to MockFacesContext12.
We will likely also want to call FacesContext.setCurrentPhaseId(PhaseId.RENDER_RESPONSE) from
RenderKitTestCase$BaseTest.setUp() so that getCurrentPhaseId() does not return null.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message