[seam-commits] Seam SVN: r11420 - in branches/community/Seam_2_2/examples/restbay/src/org/jboss/seam/example/restbay: test and 1 other directory.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Tue Aug 25 04:14:24 EDT 2009
Author: christian.bauer at jboss.com
Date: 2009-08-25 04:14:23 -0400 (Tue, 25 Aug 2009)
New Revision: 11420
Added:
branches/community/Seam_2_2/examples/restbay/src/org/jboss/seam/example/restbay/resteasy/plain/PlainRootResource.java
Modified:
branches/community/Seam_2_2/examples/restbay/src/org/jboss/seam/example/restbay/test/BasicServiceTest.java
Log:
More tests for Restbay example
Added: branches/community/Seam_2_2/examples/restbay/src/org/jboss/seam/example/restbay/resteasy/plain/PlainRootResource.java
===================================================================
--- branches/community/Seam_2_2/examples/restbay/src/org/jboss/seam/example/restbay/resteasy/plain/PlainRootResource.java (rev 0)
+++ branches/community/Seam_2_2/examples/restbay/src/org/jboss/seam/example/restbay/resteasy/plain/PlainRootResource.java 2009-08-25 08:14:23 UTC (rev 11420)
@@ -0,0 +1,20 @@
+package org.jboss.seam.example.restbay.resteasy.plain;
+
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.GET;
+
+/**
+ * @author Christian Bauer
+ */
+ at Path("/")
+public class PlainRootResource
+{
+
+ @GET
+ @Produces("text/plain")
+ public String getResource()
+ {
+ return "Root";
+ }
+}
Modified: branches/community/Seam_2_2/examples/restbay/src/org/jboss/seam/example/restbay/test/BasicServiceTest.java
===================================================================
--- branches/community/Seam_2_2/examples/restbay/src/org/jboss/seam/example/restbay/test/BasicServiceTest.java 2009-08-25 08:13:36 UTC (rev 11419)
+++ branches/community/Seam_2_2/examples/restbay/src/org/jboss/seam/example/restbay/test/BasicServiceTest.java 2009-08-25 08:14:23 UTC (rev 11420)
@@ -115,6 +115,21 @@
};
}
+ @Test
+ public void testRootResource() throws Exception {
+ new ResourceRequest(requestEnv, Method.GET, "/restv1/")
+ {
+
+ @Override
+ protected void onResponse(EnhancedMockHttpServletResponse response)
+ {
+ assertEquals(response.getStatus(), 200);
+ assertEquals(response.getContentAsString(), "Root");
+ }
+
+ }.run();
+ }
+
@Test(dataProvider = "queryPaths")
public void testExeptionMapping(final String resourcePath) throws Exception
{
More information about the seam-commits
mailing list