Author: nbelaevski
Date: 2009-07-13 06:19:10 -0400 (Mon, 13 Jul 2009)
New Revision: 14907
Modified:
ui/trunk/components/core/pom.xml
ui/trunk/components/core/src/test/java/org/ajax4jsf/component/ActionListenerTest.java
Log:
UI unit test updated
Modified: ui/trunk/components/core/pom.xml
===================================================================
--- ui/trunk/components/core/pom.xml 2009-07-12 23:01:55 UTC (rev 14906)
+++ ui/trunk/components/core/pom.xml 2009-07-13 10:19:10 UTC (rev 14907)
@@ -44,5 +44,10 @@
<artifactId>richfaces-test-base</artifactId>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>com.sun.faces</groupId>
+ <artifactId>jsf-impl</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
</project>
\ No newline at end of file
Modified:
ui/trunk/components/core/src/test/java/org/ajax4jsf/component/ActionListenerTest.java
===================================================================
---
ui/trunk/components/core/src/test/java/org/ajax4jsf/component/ActionListenerTest.java 2009-07-12
23:01:55 UTC (rev 14906)
+++
ui/trunk/components/core/src/test/java/org/ajax4jsf/component/ActionListenerTest.java 2009-07-13
10:19:10 UTC (rev 14907)
@@ -33,26 +33,20 @@
import javax.faces.convert.IntegerConverter;
import javax.faces.event.ActionEvent;
-import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
+import org.richfaces.test.AbstractFacesTest;
/**
* @author shura
*
*/
-public class ActionListenerTest extends AbstractAjax4JsfTestCase {
+public class ActionListenerTest extends AbstractFacesTest {
- /**
- * @param name
- */
- public ActionListenerTest(String name) {
- super(name);
- }
-
/* (non-Javadoc)
* @see junit.framework.TestCase#setUp()
*/
public void setUp() throws Exception {
super.setUp();
+ setupFacesRequest();
}
/* (non-Javadoc)
@@ -148,9 +142,8 @@
expressionFactory.createValueExpression(elContext, "#{bean.first}",
Integer.TYPE);
param.setAssignToBinding(expression);
Bean bean = new Bean();
- request.setAttribute("bean", bean);
- request.addParameter("param", "123");
- externalContext.getRequestParameterMap().put("param", "123");
+ facesContext.getExternalContext().getRequestMap().put("bean", bean);
+ this.connection.addRequestParameter("param", "123");
command.addActionListener(param);
command.broadcast(new ActionEvent(command));
assertEquals(123, bean.getFirst());