You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@chemistry.apache.org by dc...@apache.org on 2010/01/07 19:43:27 UTC

svn commit: r896955 - /incubator/chemistry/trunk/chemistry/chemistry-tck-atompub/src/main/java/org/apache/chemistry/tck/atompub/test/spec/ContentStreamTest.java

Author: dcaruana
Date: Thu Jan  7 18:43:26 2010
New Revision: 896955

URL: http://svn.apache.org/viewvc?rev=896955&view=rev
Log:
Add create content stream test to AtomPub TCK.
- create document without content, then PUT on edit-media link

Modified:
    incubator/chemistry/trunk/chemistry/chemistry-tck-atompub/src/main/java/org/apache/chemistry/tck/atompub/test/spec/ContentStreamTest.java

Modified: incubator/chemistry/trunk/chemistry/chemistry-tck-atompub/src/main/java/org/apache/chemistry/tck/atompub/test/spec/ContentStreamTest.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-tck-atompub/src/main/java/org/apache/chemistry/tck/atompub/test/spec/ContentStreamTest.java?rev=896955&r1=896954&r2=896955&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-tck-atompub/src/main/java/org/apache/chemistry/tck/atompub/test/spec/ContentStreamTest.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-tck-atompub/src/main/java/org/apache/chemistry/tck/atompub/test/spec/ContentStreamTest.java Thu Jan  7 18:43:26 2010
@@ -43,6 +43,19 @@
         client.executeRequest(new GetRequest(editMediaLink.getHref().toString()), 404, 409);
     }
 
+    public void testCreateContentStream() throws Exception {
+        // create document without content
+        Entry document = fixture.createTestDocument("testContent", "createdocumentNoContent.atomentry.xml", true);
+
+        // create content
+        String CREATED_CONTENT = "Created via SetContentStream()";
+        Link editMediaLink = document.getEditMediaLink();
+        Assert.assertNotNull(editMediaLink);
+        Request putReq = new PutRequest(editMediaLink.getHref().toString(), CREATED_CONTENT, CMISConstants.MIMETYPE_TEXT);
+        Response res = client.executeRequest(putReq, 200, 201);
+        Assert.assertNotNull(res);
+    }
+    
     public void testUpdateContentStream() throws Exception {
         // create document for setting / getting content
         Entry document = fixture.createTestDocument("testContent");