You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org> on 2010/06/18 06:10:23 UTC

[jira] Created: (MYFACESTEST-13) MockResource must implement all its methods

MockResource must implement all its methods
-------------------------------------------

                 Key: MYFACESTEST-13
                 URL: https://issues.apache.org/jira/browse/MYFACESTEST-13
             Project: MyFaces Test
          Issue Type: Task
          Components: Mock Objects
            Reporter: Leonardo Uribe
            Assignee: Leonardo Uribe


getRequestPath() throws UnsupportedOperationException, but many renderer tests requires it. getResponseHeaders() could return an empty map by default

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


[jira] Updated: (MYFACESTEST-13) MockResource must implement all its methods

Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/MYFACESTEST-13?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Leonardo Uribe updated MYFACESTEST-13:
--------------------------------------

    Status: Patch Available  (was: Open)

> MockResource must implement all its methods
> -------------------------------------------
>
>                 Key: MYFACESTEST-13
>                 URL: https://issues.apache.org/jira/browse/MYFACESTEST-13
>             Project: MyFaces Test
>          Issue Type: Task
>          Components: Mock Objects
>            Reporter: Leonardo Uribe
>            Assignee: Leonardo Uribe
>
> getRequestPath() throws UnsupportedOperationException, but many renderer tests requires it. getResponseHeaders() could return an empty map by default

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


[jira] Commented: (MYFACESTEST-13) MockResource must implement all its methods

Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACESTEST-13?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12887665#action_12887665 ] 

Leonardo Uribe commented on MYFACESTEST-13:
-------------------------------------------

The current implementation of MockResource and MockResourceHandler is correct but it is too simple to be used on our test cases (AbstractJsfTestCase). We need something more powerful, in a similar way as we have on myfaces core but removing all stuff that doesn't matter for a mock class. 

The proposal is rename the current implementation of MockResource and MockResourceHandler to MockSimpleResource and MockSimpleResourceHandler and provide an implementation that could be included on AbstractJsfTestCase. The proposed one will work as the default one in core (search for resources using external context and the classloader provided).

If no objections I'll commit this patch soon.

> MockResource must implement all its methods
> -------------------------------------------
>
>                 Key: MYFACESTEST-13
>                 URL: https://issues.apache.org/jira/browse/MYFACESTEST-13
>             Project: MyFaces Test
>          Issue Type: Task
>          Components: Mock Objects
>            Reporter: Leonardo Uribe
>            Assignee: Leonardo Uribe
>         Attachments: MYFACESTEST-13.patch
>
>
> getRequestPath() throws UnsupportedOperationException, but many renderer tests requires it. getResponseHeaders() could return an empty map by default

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


[jira] Updated: (MYFACESTEST-13) MockResource must implement all its methods

Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/MYFACESTEST-13?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Leonardo Uribe updated MYFACESTEST-13:
--------------------------------------

           Status: Resolved  (was: Patch Available)
    Fix Version/s: 1.0.0-SNAPSHOT
       Resolution: Fixed

I committed an enhanced version of the first patch proposed.

> MockResource must implement all its methods
> -------------------------------------------
>
>                 Key: MYFACESTEST-13
>                 URL: https://issues.apache.org/jira/browse/MYFACESTEST-13
>             Project: MyFaces Test
>          Issue Type: Task
>          Components: Mock Objects
>            Reporter: Leonardo Uribe
>            Assignee: Leonardo Uribe
>             Fix For: 1.0.0-SNAPSHOT
>
>         Attachments: MYFACESTEST-13-1.patch, MYFACESTEST-13.patch
>
>
> getRequestPath() throws UnsupportedOperationException, but many renderer tests requires it. getResponseHeaders() could return an empty map by default

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