Author: nbelaevski
Date: 2009-09-03 15:09:36 -0400 (Thu, 03 Sep 2009)
New Revision: 15457
Added:
root/framework/trunk/impl/src/test/resources/resources/
root/framework/trunk/impl/src/test/resources/resources/defaultResourceHandlerResource.js
root/framework/trunk/impl/src/test/resources/resources/org.richfaces.resource.test/
root/framework/trunk/impl/src/test/resources/resources/org.richfaces.resource.test/libraryResource.js
Removed:
root/framework/trunk/impl/src/test/resources/META-INF/resources/
Modified:
root/examples/trunk/components/pom.xml
root/framework/trunk/impl/src/test/java/org/richfaces/resource/ResourceHandlerImplTest.java
Log:
Fixed:
- modules set
- unit test updated to comply with the changes in JSF spec.
Modified: root/examples/trunk/components/pom.xml
===================================================================
--- root/examples/trunk/components/pom.xml 2009-09-03 18:47:20 UTC (rev 15456)
+++ root/examples/trunk/components/pom.xml 2009-09-03 19:09:36 UTC (rev 15457)
@@ -18,9 +18,9 @@
<modules>
<module>core-demo</module>
- <module>calendar-demo</module>
+ <!--module>calendar-demo</module>
<module>panel-demo</module>
- <module>tree-demo</module>
+ <module>tree-demo</module-->
</modules>
<dependencyManagement>
Modified:
root/framework/trunk/impl/src/test/java/org/richfaces/resource/ResourceHandlerImplTest.java
===================================================================
---
root/framework/trunk/impl/src/test/java/org/richfaces/resource/ResourceHandlerImplTest.java 2009-09-03
18:47:20 UTC (rev 15456)
+++
root/framework/trunk/impl/src/test/java/org/richfaces/resource/ResourceHandlerImplTest.java 2009-09-03
19:09:36 UTC (rev 15457)
@@ -21,6 +21,7 @@
package org.richfaces.resource;
+import java.io.File;
import java.net.URL;
import java.util.Calendar;
import java.util.Date;
@@ -66,10 +67,23 @@
private LocalWebClient webClient;
+ private static final String RESOURCES_FOLDER_PATH = "resources/";
+ private static final String TEST_RESOURCE_NAME = RESOURCES_FOLDER_PATH +
+ "defaultResourceHandlerResource.js";
+
+
+ private void addClasspathResources() {
+ ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
+ File testResourceFile = new
File(classLoader.getResource(TEST_RESOURCE_NAME).getFile());
+ File testResourceFolder = testResourceFile.getParentFile();
+ facesServer.addResourcesFromDirectory("/" + RESOURCES_FOLDER_PATH,
testResourceFolder);
+ }
+
@Override
public void setUp() throws Exception {
super.setUp();
+ addClasspathResources();
webClient = new LocalWebClient(this.facesServer);
//quick fix for
https://sourceforge.net/tracker/?func=detail&aid=2821888&group_id...
webClient.setRedirectEnabled(false);
Added:
root/framework/trunk/impl/src/test/resources/resources/defaultResourceHandlerResource.js
===================================================================
---
root/framework/trunk/impl/src/test/resources/resources/defaultResourceHandlerResource.js
(rev 0)
+++
root/framework/trunk/impl/src/test/resources/resources/defaultResourceHandlerResource.js 2009-09-03
19:09:36 UTC (rev 15457)
@@ -0,0 +1 @@
+/* that is a dependency of org.richfaces.resource.ResourceHandlerImplTest */
\ No newline at end of file
Added:
root/framework/trunk/impl/src/test/resources/resources/org.richfaces.resource.test/libraryResource.js
===================================================================
---
root/framework/trunk/impl/src/test/resources/resources/org.richfaces.resource.test/libraryResource.js
(rev 0)
+++
root/framework/trunk/impl/src/test/resources/resources/org.richfaces.resource.test/libraryResource.js 2009-09-03
19:09:36 UTC (rev 15457)
@@ -0,0 +1 @@
+/* that is a dependency of org.richfaces.resource.ResourceHandlerImplTest */
\ No newline at end of file