[jboss-svn-commits] JBoss Common SVN: r4680 - in arquillian/trunk/containers/tomcat-embedded-6: src/test/java/org/jboss/arquillian/container/tomcat/embedded_6 and 1 other directory.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Mon Jul 5 15:46:32 EDT 2010


Author: dan.j.allen
Date: 2010-07-05 15:46:32 -0400 (Mon, 05 Jul 2010)
New Revision: 4680

Added:
   arquillian/trunk/containers/tomcat-embedded-6/src/test/java/org/jboss/arquillian/container/tomcat/embedded_6/TomcatEmbeddedClientTestCase.java
Removed:
   arquillian/trunk/containers/tomcat-embedded-6/src/test/java/org/jboss/arquillian/container/tomcat/embedded_6/TomcatIntegrationTestCase.java
Modified:
   arquillian/trunk/containers/tomcat-embedded-6/pom.xml
Log:
ARQ-189 update client test name to be consistent with other containers


Modified: arquillian/trunk/containers/tomcat-embedded-6/pom.xml
===================================================================
--- arquillian/trunk/containers/tomcat-embedded-6/pom.xml	2010-07-05 19:44:14 UTC (rev 4679)
+++ arquillian/trunk/containers/tomcat-embedded-6/pom.xml	2010-07-05 19:46:32 UTC (rev 4680)
@@ -12,8 +12,8 @@
 
    <groupId>org.jboss.arquillian.container</groupId>
    <artifactId>arquillian-tomcat-embedded-6</artifactId>
-   <name>Arquillian Container Tomcat Embedded 6.x</name>
-   <description>Tomcat 6.x Embedded Container Integration for the Arquillian Project</description>
+   <name>Arquillian Container: Tomcat Embedded 6.x</name>
+   <description>Tomcat 6.x Embedded container integration for the Arquillian Project</description>
 
    <properties>
       <version.org.apache.tomcat>6.0.26</version.org.apache.tomcat>
@@ -39,7 +39,7 @@
          <artifactId>shrinkwrap-impl-base</artifactId>
       </dependency>
 
-      <!-- Not yet working -->
+      <!-- Not yet working w/o a hack -->
       <dependency>
         <groupId>org.jboss.arquillian.protocol</groupId>
         <artifactId>arquillian-protocol-servlet-ee6</artifactId>

Copied: arquillian/trunk/containers/tomcat-embedded-6/src/test/java/org/jboss/arquillian/container/tomcat/embedded_6/TomcatEmbeddedClientTestCase.java (from rev 4679, arquillian/trunk/containers/tomcat-embedded-6/src/test/java/org/jboss/arquillian/container/tomcat/embedded_6/TomcatIntegrationTestCase.java)
===================================================================
--- arquillian/trunk/containers/tomcat-embedded-6/src/test/java/org/jboss/arquillian/container/tomcat/embedded_6/TomcatEmbeddedClientTestCase.java	                        (rev 0)
+++ arquillian/trunk/containers/tomcat-embedded-6/src/test/java/org/jboss/arquillian/container/tomcat/embedded_6/TomcatEmbeddedClientTestCase.java	2010-07-05 19:46:32 UTC (rev 4680)
@@ -0,0 +1,100 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.arquillian.container.tomcat.embedded_6;
+
+import java.io.InputStream;
+import java.net.URL;
+import java.util.logging.Logger;
+
+import org.jboss.arquillian.api.Deployment;
+import org.jboss.arquillian.api.Run;
+import org.jboss.arquillian.api.RunModeType;
+import org.jboss.arquillian.container.tomcat.embedded_6.test.war.HelloWorldServlet;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * Tests that Tomcat deployments into the Tomcat server work through the
+ * Arquillian lifecycle
+ * 
+ * @author <a href="mailto:jean.deruelle at gmail.com">Jean Deruelle</a>
+ * @version $Revision: $
+ */
+ at RunWith(Arquillian.class)
+ at Run(RunModeType.AS_CLIENT)
+public class TomcatEmbeddedClientTestCase {
+
+	private static final String HELLO_WORLD_URL = "http://localhost:8888/test/hello";
+
+	// -------------------------------------------------------------------------------------||
+	// Class Members
+	// ----------------------------------------------------------------------||
+	// -------------------------------------------------------------------------------------||
+
+	/**
+	 * Logger
+	 */
+	private static final Logger log = Logger
+			.getLogger(TomcatEmbeddedClientTestCase.class.getName());
+
+	// -------------------------------------------------------------------------------------||
+	// Instance Members
+	// -------------------------------------------------------------------||
+	// -------------------------------------------------------------------------------------||
+
+	/**
+	 * Define the deployment
+	 */
+	@Deployment
+	public static WebArchive createDeployment() {
+		return ShrinkWrap.create("test.war", WebArchive.class).addClasses(
+				HelloWorldServlet.class).addWebResource(
+				HelloWorldServlet.class.getPackage(), "web.xml", "web.xml");
+	}
+
+	// -------------------------------------------------------------------------------------||
+	// Tests
+	// ------------------------------------------------------------------------------||
+	// -------------------------------------------------------------------------------------||
+
+	/**
+	 * Ensures the {@link HelloWorldServlet} returns the expected response
+	 */
+	@Test
+	public void testHelloWorldServlet() throws Exception {
+		// Define the input and expected outcome
+		final String expected = "Hello, world!";
+
+		URL url = new URL(HELLO_WORLD_URL);
+		InputStream in = url.openConnection().getInputStream();
+
+		byte[] buffer = new byte[10000];
+		int len = in.read(buffer);
+		String httpResponse = "";
+		for (int q = 0; q < len; q++)
+			httpResponse += (char) buffer[q];
+
+		// Test
+		Assert.assertEquals("Expected output was not equal by value", expected,
+				httpResponse);
+		log.info("Got expected result from Http Servlet: " + httpResponse);
+	}
+}

Deleted: arquillian/trunk/containers/tomcat-embedded-6/src/test/java/org/jboss/arquillian/container/tomcat/embedded_6/TomcatIntegrationTestCase.java
===================================================================
--- arquillian/trunk/containers/tomcat-embedded-6/src/test/java/org/jboss/arquillian/container/tomcat/embedded_6/TomcatIntegrationTestCase.java	2010-07-05 19:44:14 UTC (rev 4679)
+++ arquillian/trunk/containers/tomcat-embedded-6/src/test/java/org/jboss/arquillian/container/tomcat/embedded_6/TomcatIntegrationTestCase.java	2010-07-05 19:46:32 UTC (rev 4680)
@@ -1,100 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.arquillian.container.tomcat.embedded_6;
-
-import java.io.InputStream;
-import java.net.URL;
-import java.util.logging.Logger;
-
-import org.jboss.arquillian.api.Deployment;
-import org.jboss.arquillian.api.Run;
-import org.jboss.arquillian.api.RunModeType;
-import org.jboss.arquillian.container.tomcat.embedded_6.test.war.HelloWorldServlet;
-import org.jboss.arquillian.junit.Arquillian;
-import org.jboss.shrinkwrap.api.ShrinkWrap;
-import org.jboss.shrinkwrap.api.spec.WebArchive;
-import org.junit.Assert;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-/**
- * Tests that Tomcat deployments into the Tomcat server work through the
- * Arquillian lifecycle
- * 
- * @author <a href="mailto:jean.deruelle at gmail.com">Jean Deruelle</a>
- * @version $Revision: $
- */
- at RunWith(Arquillian.class)
- at Run(RunModeType.AS_CLIENT)
-public class TomcatIntegrationTestCase {
-
-	private static final String HELLO_WORLD_URL = "http://localhost:8888/test/hello";
-
-	// -------------------------------------------------------------------------------------||
-	// Class Members
-	// ----------------------------------------------------------------------||
-	// -------------------------------------------------------------------------------------||
-
-	/**
-	 * Logger
-	 */
-	private static final Logger log = Logger
-			.getLogger(TomcatIntegrationTestCase.class.getName());
-
-	// -------------------------------------------------------------------------------------||
-	// Instance Members
-	// -------------------------------------------------------------------||
-	// -------------------------------------------------------------------------------------||
-
-	/**
-	 * Define the deployment
-	 */
-	@Deployment
-	public static WebArchive createDeployment() {
-		return ShrinkWrap.create("test.war", WebArchive.class).addClasses(
-				HelloWorldServlet.class).addWebResource(
-				HelloWorldServlet.class.getPackage(), "web.xml", "web.xml");
-	}
-
-	// -------------------------------------------------------------------------------------||
-	// Tests
-	// ------------------------------------------------------------------------------||
-	// -------------------------------------------------------------------------------------||
-
-	/**
-	 * Ensures the {@link HelloWorldServlet} returns the expected response
-	 */
-	@Test
-	public void testHelloWorldServlet() throws Exception {
-		// Define the input and expected outcome
-		final String expected = "Hello, world!";
-
-		URL url = new URL(HELLO_WORLD_URL);
-		InputStream in = url.openConnection().getInputStream();
-
-		byte[] buffer = new byte[10000];
-		int len = in.read(buffer);
-		String httpResponse = "";
-		for (int q = 0; q < len; q++)
-			httpResponse += (char) buffer[q];
-
-		// Test
-		Assert.assertEquals("Expected output was not equal by value", expected,
-				httpResponse);
-		log.info("Got expected result from Http Servlet: " + httpResponse);
-	}
-}



More information about the jboss-svn-commits mailing list