Author: nbelaevski
Date: 2009-01-28 10:18:36 -0500 (Wed, 28 Jan 2009)
New Revision: 12468
Modified:
trunk/ui/simpleTogglePanel/src/test/java/org/richfaces/component/SimpleTogglePanelComponentTest.java
Log:
https://jira.jboss.org/jira/browse/RF-3552
Modified:
trunk/ui/simpleTogglePanel/src/test/java/org/richfaces/component/SimpleTogglePanelComponentTest.java
===================================================================
---
trunk/ui/simpleTogglePanel/src/test/java/org/richfaces/component/SimpleTogglePanelComponentTest.java 2009-01-28
14:26:14 UTC (rev 12467)
+++
trunk/ui/simpleTogglePanel/src/test/java/org/richfaces/component/SimpleTogglePanelComponentTest.java 2009-01-28
15:18:36 UTC (rev 12468)
@@ -21,25 +21,24 @@
package org.richfaces.component;
-import com.gargoylesoftware.htmlunit.html.HtmlDivision;
-import com.gargoylesoftware.htmlunit.html.HtmlElement;
-import com.gargoylesoftware.htmlunit.html.HtmlPage;
-import com.gargoylesoftware.htmlunit.html.HtmlScript;
-import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
-import org.ajax4jsf.tests.HtmlTestUtils;
-import org.apache.commons.lang.StringUtils;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
import javax.faces.component.UICommand;
import javax.faces.component.UIForm;
import javax.faces.component.UIInput;
import javax.faces.component.UIOutput;
+import javax.faces.component.UIViewRoot;
import javax.faces.component.html.HtmlCommandLink;
import javax.faces.component.html.HtmlForm;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
+import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
+
+import com.gargoylesoftware.htmlunit.html.HtmlDivision;
+import com.gargoylesoftware.htmlunit.html.HtmlElement;
+import com.gargoylesoftware.htmlunit.html.HtmlPage;
+
/**
* Unit test for SimpleTogglePanel component.
*/
@@ -243,11 +242,13 @@
HtmlPage page = renderView();
//System.out.println(page.asXml());
+ externalContext.addRequestParameterMap(form.getClientId(facesContext),
form.getClientId(facesContext));
externalContext.addRequestParameterMap(stp1.getClientId(facesContext),
"false");
stp1.setSwitchType(UISimpleTogglePanel.CLIENT_SWITCH_TYPE);
- stp1.processDecodes(facesContext);
- stp1.processValidators(facesContext);
- stp1.processUpdates(facesContext);
+ UIViewRoot viewRoot = facesContext.getViewRoot();
+ viewRoot.processDecodes(facesContext);
+ viewRoot.processValidators(facesContext);
+ viewRoot.processUpdates(facesContext);
assertFalse(stp1.isOpened());
}