Skip to content

Commit 7fc2627

Browse files
committed
Using HtmlUnit instead of HttpUnit
1 parent a898bea commit 7fc2627

File tree

1 file changed

+7
-6
lines changed
  • cdi/nobeans-el-injection-flowscoped/src/test/java/org/javaee7/cdi/nobeans/el/injection/flowscoped

1 file changed

+7
-6
lines changed

cdi/nobeans-el-injection-flowscoped/src/test/java/org/javaee7/cdi/nobeans/el/injection/flowscoped/FlowScopedBeanTest.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package org.javaee7.cdi.nobeans.el.injection.flowscoped;
22

3-
import com.meterware.httpunit.GetMethodWebRequest;
4-
import com.meterware.httpunit.WebConversation;
3+
import com.gargoylesoftware.htmlunit.WebClient;
4+
import com.gargoylesoftware.htmlunit.html.HtmlPage;
55
import java.io.File;
66
import java.net.URL;
77
import org.jboss.arquillian.container.test.api.Deployment;
@@ -12,6 +12,7 @@
1212

1313
import org.jboss.arquillian.test.api.ArquillianResource;
1414
import org.jboss.shrinkwrap.api.spec.WebArchive;
15+
import static org.junit.Assert.*;
1516

1617
/**
1718
* @author Arun Gupta
@@ -35,9 +36,9 @@ public static WebArchive deploy() {
3536

3637
@Test
3738
public void checkRenderedPage() throws Exception {
38-
WebConversation conv = new WebConversation();
39-
GetMethodWebRequest getRequest = new GetMethodWebRequest(base + "/faces/myflow/index.xhtml");
40-
String responseText = conv.getResponse(getRequest).getText();
41-
assert(responseText.contains("Hello there!"));
39+
WebClient webClient = new WebClient();
40+
HtmlPage page = webClient.getPage(base + "/faces/myflow/index.xhtml");
41+
assertNotNull(page);
42+
assert(page.asText().contains("Hello there!"));
4243
}
4344
}

0 commit comments

Comments
 (0)