chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dcaru...@apache.org
Subject svn commit: r896955 - /incubator/chemistry/trunk/chemistry/chemistry-tck-atompub/src/main/java/org/apache/chemistry/tck/atompub/test/spec/ContentStreamTest.java
Date Thu, 07 Jan 2010 18:43:27 GMT
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");



Mime
View raw message