abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From veit...@apache.org
Subject svn commit: r1452103 - in /abdera/java/trunk/server/src/test/java/org/apache/abdera/protocol/server/test/custom: CustomProviderTest.java SimpleAdapter.java
Date Sun, 03 Mar 2013 19:27:23 GMT
Author: veithen
Date: Sun Mar  3 19:27:22 2013
New Revision: 1452103

URL: http://svn.apache.org/r1452103
Log:
Fixed a test case issue (incorrect response to POST request; causing Axiom to throw an exception).

Modified:
    abdera/java/trunk/server/src/test/java/org/apache/abdera/protocol/server/test/custom/CustomProviderTest.java
    abdera/java/trunk/server/src/test/java/org/apache/abdera/protocol/server/test/custom/SimpleAdapter.java

Modified: abdera/java/trunk/server/src/test/java/org/apache/abdera/protocol/server/test/custom/CustomProviderTest.java
URL: http://svn.apache.org/viewvc/abdera/java/trunk/server/src/test/java/org/apache/abdera/protocol/server/test/custom/CustomProviderTest.java?rev=1452103&r1=1452102&r2=1452103&view=diff
==============================================================================
--- abdera/java/trunk/server/src/test/java/org/apache/abdera/protocol/server/test/custom/CustomProviderTest.java
(original)
+++ abdera/java/trunk/server/src/test/java/org/apache/abdera/protocol/server/test/custom/CustomProviderTest.java
Sun Mar  3 19:27:22 2013
@@ -141,7 +141,10 @@ public class CustomProviderTest {
         assertEquals(ResponseType.SUCCESS, resp.getType());
         assertEquals(201, resp.getStatus());
         assertNotNull(resp.getLocation());
-        resp.release();
+        Document<Entry> resp_doc = resp.getDocument();
+        // Check that the response contains the enriched entry, not the original entry
+        assertTrue(resp_doc.getRoot().getLinks("edit").iterator().hasNext());
+        
         resp = client.get(base + "/feed");
         Document<Feed> feed_doc = resp.getDocument();
         Feed feed = feed_doc.getRoot();

Modified: abdera/java/trunk/server/src/test/java/org/apache/abdera/protocol/server/test/custom/SimpleAdapter.java
URL: http://svn.apache.org/viewvc/abdera/java/trunk/server/src/test/java/org/apache/abdera/protocol/server/test/custom/SimpleAdapter.java?rev=1452103&r1=1452102&r2=1452103&view=diff
==============================================================================
--- abdera/java/trunk/server/src/test/java/org/apache/abdera/protocol/server/test/custom/SimpleAdapter.java
(original)
+++ abdera/java/trunk/server/src/test/java/org/apache/abdera/protocol/server/test/custom/SimpleAdapter.java
Sun Mar  3 19:27:22 2013
@@ -123,7 +123,7 @@ public class SimpleAdapter extends Abstr
                 feed.insertEntry(entry);
                 feed.setUpdated(new Date());
                 BaseResponseContext rc =
-                    (BaseResponseContext)ProviderHelper.returnBase(entry_doc, 201, entry.getEdited());
+                    (BaseResponseContext)ProviderHelper.returnBase(entry, 201, entry.getEdited());
                 return rc.setLocation(ProviderHelper.resolveBase(request).resolve(entry.getEditLinkResolvedHref())
                     .toString()).setContentLocation(rc.getLocation().toString()).setEntityTag(ProviderHelper
                     .calculateEntityTag(entry));



Mime
View raw message