Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jaxrs
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alan de Oliveira
jaxrs
Commits
2686c888
Commit
2686c888
authored
Aug 17, 2016
by
AndyGee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
web
parent
7d6f224d
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
44 deletions
+29
-44
pom.xml
pom.xml
+14
-27
Phone.java
src/main/java/io/microprofile/showcase/web/Phone.java
+7
-7
PhoneService.java
src/main/java/io/microprofile/showcase/web/PhoneService.java
+1
-1
PhoneServiceTest.java
...t/java/io/microprofile/showcase/web/PhoneServiceTest.java
+7
-9
No files found.
pom.xml
View file @
2686c888
...
...
@@ -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>
<!-- Change: groupId, artifactId, version -->
<groupId>
org.supertribe
</groupId>
<artifactId>
tomee-rest-angular
</artifactId>
<version>
1.0-SNAPSHOT
</version>
<parent>
<artifactId>
microprofile-conference
</artifactId>
<groupId>
io.microprofile.showcase
</groupId>
<version>
1.0.0-SNAPSHOT
</version>
</parent>
<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>
src/main/java/
org/supertribe
/Phone.java
→
src/main/java/
io/microprofile/showcase/web
/Phone.java
View file @
2686c888
...
...
@@ -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
;
}
...
...
src/main/java/
org/supertribe
/PhoneService.java
→
src/main/java/
io/microprofile/showcase/web
/PhoneService.java
View file @
2686c888
...
...
@@ -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
;
...
...
src/test/java/
org/supertribe
/PhoneServiceTest.java
→
src/test/java/
io/microprofile/showcase/web
/PhoneServiceTest.java
View file @
2686c888
...
...
@@ -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
*
*
<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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment