Permalink
Browse files

Upgrade Arquillian Core to 1.0.0.Final

  • Loading branch information...
1 parent 0d98411 commit ee22f048ff6e20710a9577defc51b4cc2553949b @aslakknutsen aslakknutsen committed Jul 22, 2012
View
2 jetty-embedded-6.1/pom.xml
@@ -112,7 +112,7 @@
</dependency>
<dependency>
<groupId>org.jboss.shrinkwrap.descriptors</groupId>
- <artifactId>shrinkwrap-descriptors-impl</artifactId>
+ <artifactId>shrinkwrap-descriptors-impl-javaee</artifactId>
<scope>test</scope>
</dependency>
View
22 ...t/java/org/jboss/arquillian/container/jetty/embedded_6_1/JettyEmbeddedClientTestCase.java
@@ -22,11 +22,12 @@
import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.arquillian.test.api.ArquillianResource;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.asset.StringAsset;
import org.jboss.shrinkwrap.api.spec.WebArchive;
import org.jboss.shrinkwrap.descriptor.api.Descriptors;
-import org.jboss.shrinkwrap.descriptor.api.spec.servlet.web.WebAppDescriptor;
+import org.jboss.shrinkwrap.descriptor.api.webapp30.WebAppDescriptor;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -49,19 +50,22 @@ public static WebArchive getTestArchive()
{
return ShrinkWrap.create(WebArchive.class, "client-test.war")
.addClass(MyServlet.class)
- .setWebXML(new StringAsset(
- Descriptors.create(WebAppDescriptor.class)
- .version("2.5")
- .servlet(MyServlet.class, "/Test")
- .exportAsString()
- ));
+ .setWebXML(new StringAsset(Descriptors.create(WebAppDescriptor.class)
+ .version("2.5")
+ .createServlet()
+ .servletClass(MyServlet.class.getName())
+ .servletName("MyServlet").up()
+ .createServletMapping()
+ .servletName("MyServlet")
+ .urlPattern(MyServlet.URL_PATTERN).up()
+ .exportAsString()));
}
@Test
- public void shouldBeAbleToInvokeServletInDeployedWebApp() throws Exception
+ public void shouldBeAbleToInvokeServletInDeployedWebApp(@ArquillianResource URL url) throws Exception
{
String body = readAllAndClose(
- new URL("http://localhost:9595/client-test" + MyServlet.URL_PATTERN).openStream());
+ new URL(url, MyServlet.URL_PATTERN).openStream());
Assert.assertEquals(
"Verify that the servlet was deployed and returns expected result",
View
2 ...bedded-6.1/src/test/java/org/jboss/arquillian/container/jetty/embedded_6_1/MyServlet.java
@@ -33,7 +33,7 @@
{
private static final long serialVersionUID = 1L;
- public static final String URL_PATTERN = "/Test";
+ public static final String URL_PATTERN = "Test";
public static final String MESSAGE = "hello";
View
2 jetty-embedded-7/pom.xml
@@ -108,7 +108,7 @@
</dependency>
<dependency>
<groupId>org.jboss.shrinkwrap.descriptors</groupId>
- <artifactId>shrinkwrap-descriptors-impl</artifactId>
+ <artifactId>shrinkwrap-descriptors-impl-javaee</artifactId>
<scope>test</scope>
</dependency>
View
22 ...est/java/org/jboss/arquillian/container/jetty/embedded_7/JettyEmbeddedClientTestCase.java
@@ -22,11 +22,12 @@
import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.arquillian.test.api.ArquillianResource;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.asset.StringAsset;
import org.jboss.shrinkwrap.api.spec.WebArchive;
import org.jboss.shrinkwrap.descriptor.api.Descriptors;
-import org.jboss.shrinkwrap.descriptor.api.spec.servlet.web.WebAppDescriptor;
+import org.jboss.shrinkwrap.descriptor.api.webapp30.WebAppDescriptor;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -49,19 +50,22 @@ public static WebArchive getTestArchive()
{
return ShrinkWrap.create(WebArchive.class, "client-test.war")
.addClass(MyServlet.class)
- .setWebXML(new StringAsset(
- Descriptors.create(WebAppDescriptor.class)
- .version("2.5")
- .servlet(MyServlet.class, "/Test")
- .exportAsString()
- ));
+ .setWebXML(new StringAsset(Descriptors.create(WebAppDescriptor.class)
+ .version("2.5")
+ .createServlet()
+ .servletClass(MyServlet.class.getName())
+ .servletName("MyServlet").up()
+ .createServletMapping()
+ .servletName("MyServlet")
+ .urlPattern(MyServlet.URL_PATTERN).up()
+ .exportAsString()));
}
@Test
- public void shouldBeAbleToInvokeServletInDeployedWebApp() throws Exception
+ public void shouldBeAbleToInvokeServletInDeployedWebApp(@ArquillianResource URL url) throws Exception
{
String body = readAllAndClose(
- new URL("http://localhost:9595/client-test" + MyServlet.URL_PATTERN).openStream());
+ new URL(url, MyServlet.URL_PATTERN).openStream());
Assert.assertEquals(
"Verify that the servlet was deployed and returns expected result",
View
2 ...y-embedded-7/src/test/java/org/jboss/arquillian/container/jetty/embedded_7/MyServlet.java
@@ -33,7 +33,7 @@
{
private static final long serialVersionUID = 1L;
- public static final String URL_PATTERN = "/Test";
+ public static final String URL_PATTERN = "Test";
public static final String MESSAGE = "hello";
View
2 pom.xml
@@ -30,7 +30,7 @@
<properties>
<!-- Versioning -->
- <version.arquillian_core>1.0.0.Final-SNAPSHOT</version.arquillian_core>
+ <version.arquillian_core>1.0.0.Final</version.arquillian_core>
<version.weld-servlet>1.1.1.Final</version.weld-servlet>
<version.cdi-api>1.0</version.cdi-api>

0 comments on commit ee22f04

Please sign in to comment.