[richfaces-issues] [JBoss JIRA] Closed: (RF-3534) Implement resource checking functions in org.ajax4jsf.tests.AbstractAjax4JsfTestCase

Tsikhon Kuprevich (JIRA) jira-events at lists.jboss.org
Tue Aug 5 05:04:56 EDT 2008


     [ https://jira.jboss.org/jira/browse/RF-3534?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tsikhon Kuprevich closed RF-3534.
---------------------------------



> Implement resource checking functions in org.ajax4jsf.tests.AbstractAjax4JsfTestCase
> ------------------------------------------------------------------------------------
>
>                 Key: RF-3534
>                 URL: https://jira.jboss.org/jira/browse/RF-3534
>             Project: RichFaces
>          Issue Type: Sub-task
>    Affects Versions: 3.2.1
>            Reporter: Nick Belaevski
>            Assignee: Tsikhon Kuprevich
>             Fix For: 3.2.2
>
>
> 1. Function to check script/style resource, returns resource context or throws IOException if error 
> 2. Function to check image resource, returns org.ajax4jsf.resource.image.ImageInfo (invoke check() method before returning it), null if resource check is false or throws IOException if resource isn't available
> 3. Refactor all unit tests to use that functions
> Appendix - sample resource function code:
>     private void checkResource(String path) throws IOException {
>         InternetResourceBuilder builder = ResourceBuilderImpl.getInstance();
>     	builder.createResource(null, path);
>         InternetResource resource = builder.getResource(path);
>         assertNotNull(resource);
>         String uri = "http:" + resource.getUri(facesContext, null);
>         Page page = webClient.getPage(uri);
>         assertTrue(page.getWebResponse().getStatusCode() == HttpServletResponse.SC_OK);
>         ImageInfo info = new ImageInfo();
>         info.setInput(page.getWebResponse().getContentAsStream());
>         
>         assertTrue(info.check());
>     }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the richfaces-issues mailing list