Author: heiko.braun(a)jboss.com
Date: 2007-10-31 10:41:44 -0400 (Wed, 31 Oct 2007)
New Revision: 4958
Modified:
stack/native/branches/rest/src/test/java/org/jboss/test/rs/model/ResolverTestCase.java
stack/native/branches/rest/src/test/java/org/jboss/test/rs/model/WidgetList.java
Log:
Extend resolver tests case to check mime matching
Modified:
stack/native/branches/rest/src/test/java/org/jboss/test/rs/model/ResolverTestCase.java
===================================================================
---
stack/native/branches/rest/src/test/java/org/jboss/test/rs/model/ResolverTestCase.java 2007-10-31
14:41:21 UTC (rev 4957)
+++
stack/native/branches/rest/src/test/java/org/jboss/test/rs/model/ResolverTestCase.java 2007-10-31
14:41:44 UTC (rev 4958)
@@ -105,8 +105,9 @@
{
URI uri = new
URI("http://jboss.com/widgets");
RuntimeContext context = defaultRuntimeContext(MethodHTTP.GET, uri);
+ context.parseAcceptHeader("text/plain");
+
ResourceResolver resolver = ResourceResolver.newInstance(context);
-
ResourceMethod method = resolver.resolve();
assertNotNull(method);
Modified:
stack/native/branches/rest/src/test/java/org/jboss/test/rs/model/WidgetList.java
===================================================================
---
stack/native/branches/rest/src/test/java/org/jboss/test/rs/model/WidgetList.java 2007-10-31
14:41:21 UTC (rev 4957)
+++
stack/native/branches/rest/src/test/java/org/jboss/test/rs/model/WidgetList.java 2007-10-31
14:41:44 UTC (rev 4958)
@@ -26,11 +26,13 @@
import javax.ws.rs.UriTemplate;
import javax.ws.rs.POST;
import javax.ws.rs.ConsumeMime;
+import javax.ws.rs.ProduceMime;
@UriTemplate("widgets")
public class WidgetList
{
@GET
+ @ProduceMime({"text/plain"})
String getDescription() {
return "A widgetlist";
}