[jackson-jaxrs-providers] 35/162: ...
Timo Aaltonen
tjaalton at moszumanska.debian.org
Mon Sep 8 22:16:25 UTC 2014
This is an automated email from the git hooks/post-receive script.
tjaalton pushed a commit to branch master
in repository jackson-jaxrs-providers.
commit 43e91d3a5e0a82de179e1da3919b1c1266aee3f1
Author: Tatu Saloranta <tsaloranta at gmail.com>
Date: Thu Apr 11 22:33:49 2013 -0700
...
---
.../jackson/jaxrs/json/JaxrsTestBase.java | 2 +-
.../jackson/jaxrs/json/dw/TestSimpleEndpoint.java | 23 +++++++++++++++-------
2 files changed, 17 insertions(+), 8 deletions(-)
diff --git a/json/src/test/java/com/fasterxml/jackson/jaxrs/json/JaxrsTestBase.java b/json/src/test/java/com/fasterxml/jackson/jaxrs/json/JaxrsTestBase.java
index 1e9eb92..b55c2c9 100644
--- a/json/src/test/java/com/fasterxml/jackson/jaxrs/json/JaxrsTestBase.java
+++ b/json/src/test/java/com/fasterxml/jackson/jaxrs/json/JaxrsTestBase.java
@@ -24,7 +24,7 @@ public abstract class JaxrsTestBase
/**********************************************************
*/
- protected Server startServer(int port, Class<? extends Application> appClass)
+ protected Server startServer(int port, Class<?> appClass)
{
Server server = new Server(port);
final ContextHandlerCollection contexts = new ContextHandlerCollection();
diff --git a/json/src/test/java/com/fasterxml/jackson/jaxrs/json/dw/TestSimpleEndpoint.java b/json/src/test/java/com/fasterxml/jackson/jaxrs/json/dw/TestSimpleEndpoint.java
index 607ec32..ad2a86d 100644
--- a/json/src/test/java/com/fasterxml/jackson/jaxrs/json/dw/TestSimpleEndpoint.java
+++ b/json/src/test/java/com/fasterxml/jackson/jaxrs/json/dw/TestSimpleEndpoint.java
@@ -1,10 +1,15 @@
package com.fasterxml.jackson.jaxrs.json.dw;
+import java.util.*;
+
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
+import javax.ws.rs.core.Application;
import javax.ws.rs.core.MediaType;
+import org.eclipse.jetty.server.Server;
+
import com.fasterxml.jackson.jaxrs.json.JaxrsTestBase;
public class TestSimpleEndpoint extends JaxrsTestBase
@@ -12,7 +17,7 @@ public class TestSimpleEndpoint extends JaxrsTestBase
static class Point {
public int x, y;
}
-
+
static class SimpleResource {
@Path("/point")
@GET
@@ -21,6 +26,14 @@ public class TestSimpleEndpoint extends JaxrsTestBase
return new Point();
}
}
+
+ static class SimpleResourceApp extends Application
+ {
+ @Override
+ public Set<Object> getSingletons() {
+ return new HashSet<Object>(Arrays.<Object>asList(SimpleResource.class));
+ }
+ }
/*
/**********************************************************
@@ -30,12 +43,8 @@ public class TestSimpleEndpoint extends JaxrsTestBase
public void testStandardJson() throws Exception
{
- /*
- TestServiceConfig config = new TestServiceConfig(9090);
- TestService svc = TestService.create(config, new SimpleResource());
- svc.start();
- svc.stop();
- */
+ Server server = startServer(6061, SimpleResourceApp.class);
+ server.stop();
}
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/jackson-jaxrs-providers.git
More information about the pkg-java-commits
mailing list