Commit 2686c888 by AndyGee

web

parent 7d6f224d
...@@ -17,38 +17,34 @@ ...@@ -17,38 +17,34 @@
--> -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>microprofile-conference</artifactId>
<groupId>io.microprofile.showcase</groupId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<!-- Change: groupId, artifactId, version --> <artifactId>web-application</artifactId>
<groupId>org.supertribe</groupId> <name>Conference :: Web</name>
<artifactId>tomee-rest-angular</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging> <packaging>war</packaging>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.apache.openejb</groupId> <groupId>org.apache.tomee</groupId>
<artifactId>javaee-api</artifactId> <artifactId>javaee-api</artifactId>
<version>${openejb.javaee.api}</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.openejb</groupId> <groupId>org.apache.tomee</groupId>
<artifactId>arquillian-tomee-embedded</artifactId> <artifactId>arquillian-tomee-embedded</artifactId>
<version>${tomee.version}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.openejb</groupId> <groupId>org.apache.tomee</groupId>
<artifactId>tomee-jaxrs</artifactId> <artifactId>tomee-jaxrs</artifactId>
<version>${tomee.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
</dependencies> </dependencies>
...@@ -57,23 +53,14 @@ ...@@ -57,23 +53,14 @@
<finalName>ROOT</finalName> <finalName>ROOT</finalName>
<plugins> <plugins>
<plugin> <plugin>
<groupId>org.apache.openejb.maven</groupId> <groupId>org.apache.tomee.maven</groupId>
<artifactId>tomee-maven-plugin</artifactId> <artifactId>tomee-maven-plugin</artifactId>
<version>${tomee.version}</version>
<configuration> <configuration>
<tomeeVersion>${tomee.version}</tomeeVersion> <tomeeVersion>${version.tomee}</tomeeVersion>
<tomeeClassifier>jaxrs</tomeeClassifier> <tomeeClassifier>jaxrs</tomeeClassifier>
</configuration> </configuration>
</plugin> </plugin>
</plugins> </plugins>
</build> </build>
<properties>
<tomee.version>1.7.1</tomee.version>
<openejb.javaee.api>6.0-6</openejb.javaee.api>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<failOnMissingWebXml>false</failOnMissingWebXml>
<maven.compiler.target>1.7</maven.compiler.target>
<maven.compiler.source>1.7</maven.compiler.source>
</properties>
</project> </project>
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.supertribe; package io.microprofile.showcase.web;
import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlRootElement;
...@@ -31,7 +31,7 @@ public class Phone { ...@@ -31,7 +31,7 @@ public class Phone {
public Phone() { public Phone() {
} }
public Phone(int age, String carrier, String id, String name, String snippet) { public Phone(final int age, final String carrier, final String id, final String name, final String snippet) {
this.age = age; this.age = age;
this.carrier = carrier; this.carrier = carrier;
this.id = id; this.id = id;
...@@ -43,7 +43,7 @@ public class Phone { ...@@ -43,7 +43,7 @@ public class Phone {
return age; return age;
} }
public void setAge(int age) { public void setAge(final int age) {
this.age = age; this.age = age;
} }
...@@ -51,7 +51,7 @@ public class Phone { ...@@ -51,7 +51,7 @@ public class Phone {
return carrier; return carrier;
} }
public void setCarrier(String carrier) { public void setCarrier(final String carrier) {
this.carrier = carrier; this.carrier = carrier;
} }
...@@ -59,7 +59,7 @@ public class Phone { ...@@ -59,7 +59,7 @@ public class Phone {
return id; return id;
} }
public void setId(String id) { public void setId(final String id) {
this.id = id; this.id = id;
} }
...@@ -67,7 +67,7 @@ public class Phone { ...@@ -67,7 +67,7 @@ public class Phone {
return name; return name;
} }
public void setName(String name) { public void setName(final String name) {
this.name = name; this.name = name;
} }
...@@ -75,7 +75,7 @@ public class Phone { ...@@ -75,7 +75,7 @@ public class Phone {
return snippet; return snippet;
} }
public void setSnippet(String snippet) { public void setSnippet(final String snippet) {
this.snippet = snippet; this.snippet = snippet;
} }
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.supertribe; package io.microprofile.showcase.web;
import javax.ejb.Lock; import javax.ejb.Lock;
import javax.ejb.Singleton; import javax.ejb.Singleton;
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.supertribe; package io.microprofile.showcase.web;
import org.apache.cxf.jaxrs.client.WebClient; import org.apache.cxf.jaxrs.client.WebClient;
import org.jboss.arquillian.container.test.api.Deployment; import org.jboss.arquillian.container.test.api.Deployment;
...@@ -33,25 +33,24 @@ import java.util.Iterator; ...@@ -33,25 +33,24 @@ import java.util.Iterator;
/** /**
* Arquillian will start the container, deploy all @Deployment bundles, then run all the @Test methods. * Arquillian will start the container, deploy all @Deployment bundles, then run all the @Test methods.
* * <p>
* A strong value-add for Arquillian is that the test is abstracted from the server. * A strong value-add for Arquillian is that the test is abstracted from the server.
* It is possible to rerun the same test against multiple adapters or server configurations. * It is possible to rerun the same test against multiple adapters or server configurations.
* * <p>
* A second value-add is it is possible to build WebArchives that are slim and trim and therefore * A second value-add is it is possible to build WebArchives that are slim and trim and therefore
* isolate the functionality being tested. This also makes it easier to swap out one implementation * isolate the functionality being tested. This also makes it easier to swap out one implementation
* of a class for another allowing for easy mocking. * of a class for another allowing for easy mocking.
*
*/ */
@RunWith(Arquillian.class) @RunWith(Arquillian.class)
public class PhoneServiceTest extends Assert { public class PhoneServiceTest extends Assert {
/** /**
* ShrinkWrap is used to create a war file on the fly. * ShrinkWrap is used to create a war file on the fly.
* * <p>
* The API is quite expressive and can build any possible * The API is quite expressive and can build any possible
* flavor of war file. It can quite easily return a rebuilt * flavor of war file. It can quite easily return a rebuilt
* war file as well. * war file as well.
* * <p>
* More than one @Deployment method is allowed. * More than one @Deployment method is allowed.
*/ */
@Deployment @Deployment
...@@ -61,12 +60,11 @@ public class PhoneServiceTest extends Assert { ...@@ -61,12 +60,11 @@ public class PhoneServiceTest extends Assert {
/** /**
* This URL will contain the following URL data * This URL will contain the following URL data
* * <p>
* - http://<host>:<port>/<webapp>/ * - http://<host>:<port>/<webapp>/
* * <p>
* This allows the test itself to be agnostic of server information or even * This allows the test itself to be agnostic of server information or even
* the name of the webapp * the name of the webapp
*
*/ */
@ArquillianResource @ArquillianResource
private URL webappUrl; private URL webappUrl;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment