[richfaces-issues] [JBoss JIRA] Closed: (RF-3535) Add messages to all scripts/styles unit tests
Tsikhon Kuprevich (JIRA)
jira-events at lists.jboss.org
Mon Jun 30 11:46:32 EDT 2008
[ http://jira.jboss.com/jira/browse/RF-3535?page=all ]
Tsikhon Kuprevich closed RF-3535.
---------------------------------
> Add messages to all scripts/styles unit tests
> ---------------------------------------------
>
> Key: RF-3535
> URL: http://jira.jboss.com/jira/browse/RF-3535
> Project: RichFaces
> Issue Type: Sub-task
> Affects Versions: 3.2.1
> Reporter: Nick Belaevski
> Assigned To: Tsikhon Kuprevich
> Fix For: 3.2.2
>
>
> Add messages with information about resource being processed to all applicable asserts:
> public void testRenderScript() throws Exception {
> HtmlPage view = renderView();
> assertNotNull(view);
> List<HtmlScript> scripts = view.getDocumentHtmlElement().getHtmlElementsByTagName(HTML.SCRIPT_ELEM);
> int foundCount = 0;
> for (Iterator<HtmlScript> it = scripts.iterator(); it.hasNext();) {
> HtmlScript item = it.next();
> String srcAttr = item.getSrcAttribute();
> if (StringUtils.isNotBlank(srcAttr)) {
> boolean found = false;
> for (Iterator<String> srcIt = javaScripts.iterator(); srcIt.hasNext();) {
> String src = (String) srcIt.next();
> found = srcAttr.contains(src);
> if (found) {
> foundCount++;
>
> String uri = "http:" + srcAttr;
> Page page = webClient.getPage(uri);
> assertNotNull(page);
> assertTrue(page.getWebResponse().getStatusCode() == HttpServletResponse.SC_OK);
>
> break;
> }
> }
> assertTrue(found);
> }
> }
> assertEquals(javaScripts.size(), foundCount);
> }
> E.g.:
> assertTrue(found); -> assertTrue(srcAttr, found);
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the richfaces-issues
mailing list