Commit 2686c888 by AndyGee

web

parent 7d6f224d
......@@ -17,38 +17,34 @@
-->
<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">
<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 -->
<groupId>org.supertribe</groupId>
<artifactId>tomee-rest-angular</artifactId>
<version>1.0-SNAPSHOT</version>
<artifactId>web-application</artifactId>
<name>Conference :: Web</name>
<packaging>war</packaging>
<dependencies>
<dependency>
<groupId>org.apache.openejb</groupId>
<groupId>org.apache.tomee</groupId>
<artifactId>javaee-api</artifactId>
<version>${openejb.javaee.api}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.openejb</groupId>
<groupId>org.apache.tomee</groupId>
<artifactId>arquillian-tomee-embedded</artifactId>
<version>${tomee.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.openejb</groupId>
<groupId>org.apache.tomee</groupId>
<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>
</dependency>
</dependencies>
......@@ -57,23 +53,14 @@
<finalName>ROOT</finalName>
<plugins>
<plugin>
<groupId>org.apache.openejb.maven</groupId>
<groupId>org.apache.tomee.maven</groupId>
<artifactId>tomee-maven-plugin</artifactId>
<version>${tomee.version}</version>
<configuration>
<tomeeVersion>${tomee.version}</tomeeVersion>
<tomeeVersion>${version.tomee}</tomeeVersion>
<tomeeClassifier>jaxrs</tomeeClassifier>
</configuration>
</plugin>
</plugins>
</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>
......@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.supertribe;
package io.microprofile.showcase.web;
import javax.xml.bind.annotation.XmlRootElement;
......@@ -31,7 +31,7 @@ public class 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.carrier = carrier;
this.id = id;
......@@ -43,7 +43,7 @@ public class Phone {
return age;
}
public void setAge(int age) {
public void setAge(final int age) {
this.age = age;
}
......@@ -51,7 +51,7 @@ public class Phone {
return carrier;
}
public void setCarrier(String carrier) {
public void setCarrier(final String carrier) {
this.carrier = carrier;
}
......@@ -59,7 +59,7 @@ public class Phone {
return id;
}
public void setId(String id) {
public void setId(final String id) {
this.id = id;
}
......@@ -67,7 +67,7 @@ public class Phone {
return name;
}
public void setName(String name) {
public void setName(final String name) {
this.name = name;
}
......@@ -75,7 +75,7 @@ public class Phone {
return snippet;
}
public void setSnippet(String snippet) {
public void setSnippet(final String snippet) {
this.snippet = snippet;
}
......
......@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.supertribe;
package io.microprofile.showcase.web;
import javax.ejb.Lock;
import javax.ejb.Singleton;
......
......@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.supertribe;
package io.microprofile.showcase.web;
import org.apache.cxf.jaxrs.client.WebClient;
import org.jboss.arquillian.container.test.api.Deployment;
......@@ -33,25 +33,24 @@ import java.util.Iterator;
/**
* 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.
* 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
* isolate the functionality being tested. This also makes it easier to swap out one implementation
* of a class for another allowing for easy mocking.
*
*/
@RunWith(Arquillian.class)
public class PhoneServiceTest extends Assert {
/**
* ShrinkWrap is used to create a war file on the fly.
*
* <p>
* The API is quite expressive and can build any possible
* flavor of war file. It can quite easily return a rebuilt
* war file as well.
*
* <p>
* More than one @Deployment method is allowed.
*/
@Deployment
......@@ -61,12 +60,11 @@ public class PhoneServiceTest extends Assert {
/**
* This URL will contain the following URL data
*
* - http://<host>:<port>/<webapp>/
*
* <p>
* - http://<host>:<port>/<webapp>/
* <p>
* This allows the test itself to be agnostic of server information or even
* the name of the webapp
*
*/
@ArquillianResource
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