You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Pavitra Subramaniam (JIRA)" <de...@myfaces.apache.org> on 2010/09/16 04:10:32 UTC

[jira] Updated: (TRINIDAD-1861) Add implementations for getCurrentPhaseId()/setCurrentPhaseId() to MockFacesContext12

     [ https://issues.apache.org/jira/browse/TRINIDAD-1861?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pavitra Subramaniam updated TRINIDAD-1861:
------------------------------------------

    Status: Patch Available  (was: Open)

> Add implementations for getCurrentPhaseId()/setCurrentPhaseId() to MockFacesContext12
> -------------------------------------------------------------------------------------
>
>                 Key: TRINIDAD-1861
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1861
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: 2.0.0.3-core
>         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 APIs.
> 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.


Re: [jira] Updated: (TRINIDAD-1861) Add implementations for getCurrentPhaseId()/setCurrentPhaseId() to MockFacesContext12

Posted by Pavitra Subramaniam <pa...@oracle.com>.
Please review the submitted patch and commit if approved.

Thanks
Pavitra

On 9/15/2010 7:10 PM, Pavitra Subramaniam (JIRA) wrote:
>       [ https://issues.apache.org/jira/browse/TRINIDAD-1861?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
>
> Pavitra Subramaniam updated TRINIDAD-1861:
> ------------------------------------------
>
>      Status: Patch Available  (was: Open)
>
>    
>> Add implementations for getCurrentPhaseId()/setCurrentPhaseId() to MockFacesContext12
>> -------------------------------------------------------------------------------------
>>
>>                  Key: TRINIDAD-1861
>>                  URL: https://issues.apache.org/jira/browse/TRINIDAD-1861
>>              Project: MyFaces Trinidad
>>           Issue Type: Bug
>>           Components: Build
>>     Affects Versions: 2.0.0.3-core
>>          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 APIs.
>> 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.
>>      
>