Author: nbelaevski
Date: 2007-05-02 23:19:26 -0400 (Wed, 02 May 2007)
New Revision: 620
Modified:
trunk/richfaces/dataFilterSlider/src/test/java/org/richfaces/component/DataFilterSliderComponentTest.java
trunk/richfaces/datascroller/src/test/java/org/richfaces/component/DatascrollerComponentTest.java
trunk/richfaces/drag-drop/src/test/java/org/richfaces/component/DragDropTest.java
trunk/richfaces/dropdown-menu/src/test/java/org/richfaces/component/DropDownMenuComponentTest.java
trunk/richfaces/gmap/src/test/java/org/richfaces/component/GmapComponentTest.java
trunk/richfaces/tree/src/test/java/org/richfaces/component/TreeComponentTest.java
Log:
Unit tests updated
Modified:
trunk/richfaces/dataFilterSlider/src/test/java/org/richfaces/component/DataFilterSliderComponentTest.java
===================================================================
---
trunk/richfaces/dataFilterSlider/src/test/java/org/richfaces/component/DataFilterSliderComponentTest.java 2007-05-03
02:34:26 UTC (rev 619)
+++
trunk/richfaces/dataFilterSlider/src/test/java/org/richfaces/component/DataFilterSliderComponentTest.java 2007-05-03
03:19:26 UTC (rev 620)
@@ -80,9 +80,9 @@
*/
static {
- javaScripts.add("prototype.js");
+ javaScripts.add("org.ajax4jsf.framework.resource.PrototypeScript");
javaScripts.add("org.ajax4jsf.framework.ajax.AjaxScript");
-
javaScripts.add("org/richfaces/renderkit/html/scripts/scriptaculous-js-1.6.5/src/slider.js");
+ javaScripts.add("scripts/scriptaculous-js-1.6.5/src/slider.js");
}
public DataFilterSliderComponentTest(String testName) {
@@ -157,7 +157,7 @@
public void testRenderImages() throws Exception {
renderView();
InternetResourceBuilder builder = ResourceBuilderImpl.getInstance();
- InternetResource resource =
builder.getResource("org/richfaces/renderkit/html/css/dataFilterSlider.xcss");
+ InternetResource resource =
builder.getResource("css/dataFilterSlider.xcss");
assertNotNull(resource);
String uri = "http:" + resource.getUri(facesContext, null);
Page page = webClient.getPage(uri);
@@ -195,7 +195,7 @@
List links =
page.getDocumentElement().getHtmlElementsByTagName("link");
assertEquals(1, links.size());
HtmlElement link = (HtmlElement) links.get(0);
-
assertTrue(link.getAttributeValue("href").contains("org/richfaces/renderkit/html/css/dataFilterSlider.xcss"));
+
assertTrue(link.getAttributeValue("href").contains("css/dataFilterSlider.xcss"));
}
public void testRenderScript() throws Exception {
Modified:
trunk/richfaces/datascroller/src/test/java/org/richfaces/component/DatascrollerComponentTest.java
===================================================================
---
trunk/richfaces/datascroller/src/test/java/org/richfaces/component/DatascrollerComponentTest.java 2007-05-03
02:34:26 UTC (rev 619)
+++
trunk/richfaces/datascroller/src/test/java/org/richfaces/component/DatascrollerComponentTest.java 2007-05-03
03:19:26 UTC (rev 620)
@@ -57,7 +57,7 @@
static {
javaScripts.add("org.ajax4jsf.framework.ajax.AjaxScript");
- javaScripts.add("prototype.js");
+ javaScripts.add("org.ajax4jsf.framework.resource.PrototypeScript");
}
private UIDatascroller scroller;
@@ -247,7 +247,7 @@
assertEquals(1, links.size());
HtmlElement link = (HtmlElement) links.get(0);
- assertTrue(link.getAttributeValue("href").contains("org/richfaces/renderkit/html/css/datascroller.xcss"));
+ assertTrue(link.getAttributeValue("href").contains("css/datascroller.xcss"));
}
/**
Modified:
trunk/richfaces/drag-drop/src/test/java/org/richfaces/component/DragDropTest.java
===================================================================
---
trunk/richfaces/drag-drop/src/test/java/org/richfaces/component/DragDropTest.java 2007-05-03
02:34:26 UTC (rev 619)
+++
trunk/richfaces/drag-drop/src/test/java/org/richfaces/component/DragDropTest.java 2007-05-03
03:19:26 UTC (rev 620)
@@ -40,24 +40,25 @@
private static Set javaScripts = new HashSet();
static {
- javaScripts.add("prototype.js");
+ javaScripts.add("org.ajax4jsf.framework.resource.PrototypeScript");
javaScripts.add("org.ajax4jsf.framework.ajax.AjaxScript");
- javaScripts.add("org/richfaces/renderkit/html/scripts/browser_info.js");
- javaScripts.add("/a4j.res/dnd.js");
- javaScripts.add("org/richfaces/renderkit/html/scripts/events.js");
+ javaScripts.add("scripts/browser_info.js");
+ javaScripts.add("org.ajax4jsf.dnd.DnDScript");
+ javaScripts.add("scripts/events.js");
+ javaScripts.add("scripts/utils.js");
javaScripts
- .add("/org/richfaces/renderkit/html/scripts/simple-draggable.js");
+ .add("scripts/simple-draggable.js");
javaScripts
- .add("/org/richfaces/renderkit/html/scripts/simple-dropzone.js");
- javaScripts.add("/org/richfaces/renderkit/html/scripts/json/json.js");
+ .add("scripts/simple-dropzone.js");
+ javaScripts.add("scripts/json/json.js");
javaScripts
- .add("/org/richfaces/renderkit/html/scripts/dnd/dnd-common.js");
+ .add("scripts/dnd/dnd-common.js");
javaScripts
- .add("/org/richfaces/renderkit/html/scripts/dnd/dnd-dropzone.js");
+ .add("scripts/dnd/dnd-dropzone.js");
javaScripts
- .add("/org/richfaces/renderkit/html/scripts/dnd/dnd-draggable.js");
+ .add("scripts/dnd/dnd-draggable.js");
javaScripts
- .add("/org/richfaces/renderkit/html/scripts/drag-indicator.js");
+ .add("scripts/drag-indicator.js");
}
private static Set eventsSet = new HashSet();
static {
Modified:
trunk/richfaces/dropdown-menu/src/test/java/org/richfaces/component/DropDownMenuComponentTest.java
===================================================================
---
trunk/richfaces/dropdown-menu/src/test/java/org/richfaces/component/DropDownMenuComponentTest.java 2007-05-03
02:34:26 UTC (rev 619)
+++
trunk/richfaces/dropdown-menu/src/test/java/org/richfaces/component/DropDownMenuComponentTest.java 2007-05-03
03:19:26 UTC (rev 620)
@@ -50,7 +50,7 @@
private static Set javaScripts = new HashSet();
static {
- javaScripts.add("prototype.js");
+ javaScripts.add("org.ajax4jsf.framework.resource.PrototypeScript");
javaScripts.add("org.ajax4jsf.framework.ajax.AjaxScript");
javaScripts.add("org.ajax4jsf.framework.util.command.CommandScript");
javaScripts.add("scripts/menu.js");
@@ -184,7 +184,7 @@
List links =
page.getDocumentElement().getHtmlElementsByTagName("link");
assertEquals(2, links.size());
HtmlElement link = (HtmlElement) links.get(0);
-
assertTrue(link.getAttributeValue("href").contains("org/richfaces/renderkit/html/css/dropdownmenu.xcss"));
+
assertTrue(link.getAttributeValue("href").contains("css/dropdownmenu.xcss"));
}
/**
@@ -217,7 +217,7 @@
public void testRenderImages() throws Exception {
renderView();
InternetResourceBuilder builder = ResourceBuilderImpl.getInstance();
- InternetResource resource =
builder.getResource("org/richfaces/renderkit/html/css/dropdownmenu.xcss");
+ InternetResource resource =
builder.getResource("css/dropdownmenu.xcss");
assertNotNull(resource);
String uri = "http:" + resource.getUri(facesContext, null);
Page page = webClient.getPage(uri);
Modified:
trunk/richfaces/gmap/src/test/java/org/richfaces/component/GmapComponentTest.java
===================================================================
---
trunk/richfaces/gmap/src/test/java/org/richfaces/component/GmapComponentTest.java 2007-05-03
02:34:26 UTC (rev 619)
+++
trunk/richfaces/gmap/src/test/java/org/richfaces/component/GmapComponentTest.java 2007-05-03
03:19:26 UTC (rev 620)
@@ -26,11 +26,6 @@
import java.util.List;
import java.util.Set;
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-import javax.faces.component.UICommand;
import javax.faces.component.UIComponent;
import javax.faces.component.UIForm;
import javax.faces.component.html.HtmlForm;
@@ -38,8 +33,6 @@
import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
import org.apache.commons.lang.StringUtils;
-import com.gargoylesoftware.htmlunit.html.DomNode;
-import com.gargoylesoftware.htmlunit.html.DomText;
import com.gargoylesoftware.htmlunit.html.HtmlElement;
import com.gargoylesoftware.htmlunit.html.HtmlPage;
import com.gargoylesoftware.htmlunit.html.HtmlScript;
@@ -55,7 +48,7 @@
private final static String TEST_STYLE = "width:500px; height:400px";
static {
- javaScripts.add("prototype.js");
+ javaScripts.add("org.ajax4jsf.framework.resource.PrototypeScript");
javaScripts.add("org.ajax4jsf.framework.ajax.AjaxScript");
javaScripts.add("script/gmap.js");
javaScripts.add("http://maps.google.com");
@@ -115,7 +108,7 @@
assertEquals(1, links.size());
HtmlElement link = (HtmlElement) links.get(0);
-
assertTrue(link.getAttributeValue("href").contains("org/richfaces/renderkit/html/css/gmap.xcss"));
+
assertTrue(link.getAttributeValue("href").contains("css/gmap.xcss"));
}
public void testRenderScript() throws Exception {
Modified:
trunk/richfaces/tree/src/test/java/org/richfaces/component/TreeComponentTest.java
===================================================================
---
trunk/richfaces/tree/src/test/java/org/richfaces/component/TreeComponentTest.java 2007-05-03
02:34:26 UTC (rev 619)
+++
trunk/richfaces/tree/src/test/java/org/richfaces/component/TreeComponentTest.java 2007-05-03
03:19:26 UTC (rev 620)
@@ -72,15 +72,17 @@
static {
javaScripts.add("/org/richfaces/renderkit/html/scripts/json/json.js");
- javaScripts.add("prototype.js");
- javaScripts.add("dnd.js");
+
+ javaScripts.add("org.ajax4jsf.framework.resource.PrototypeScript");
+ javaScripts.add("scripts/AJAX.js");
+ javaScripts.add("org.ajax4jsf.dnd.DnDScript");
+
javaScripts.add("/org/richfaces/renderkit/html/scripts/utils.js");
javaScripts.add("/org/richfaces/renderkit/html/scripts/dnd/dnd-common.js");
javaScripts.add("/org/richfaces/renderkit/html/scripts/dnd/dnd-draggable.js");
javaScripts.add("/org/richfaces/renderkit/html/scripts/dnd/dnd-dropzone.js");
- javaScripts.add("/org/ajax4jsf/framework/ajax/scripts/AJAX.js");
javaScripts.add("/org/ajax4jsf/renderkit/html/scripts/form.js");
javaScripts.add("/org/richfaces/renderkit/html/scripts/events.js");
javaScripts.add("/org/richfaces/renderkit/html/scripts/tree.js");
@@ -94,8 +96,8 @@
private static Set cssStyles = new HashSet();
static {
- cssStyles.add("/org/richfaces/renderkit/html/css/dragIndicator.xcss");
- cssStyles.add("/org/richfaces/renderkit/html/css/tree.xcss");
+ cssStyles.add("css/dragIndicator.xcss");
+ cssStyles.add("css/tree.xcss");
}
private UICommand command = null;
@@ -247,7 +249,7 @@
public void testRenderImages() throws Exception {
renderView();
InternetResourceBuilder builder = ResourceBuilderImpl.getInstance();
- InternetResource resource =
builder.getResource("org/richfaces/renderkit/html/css/tree.xcss");
+ InternetResource resource = builder.getResource("css/tree.xcss");
assertNotNull(resource);
String uri = "http:" + resource.getUri(facesContext, null);
Page page = webClient.getPage(uri);