Modified: shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/dataservice/integration/fixtures/ActivityEntryJsonIds.json URL: http://svn.apache.org/viewvc/shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/dataservice/integration/fixtures/ActivityEntryJsonIds.json?rev=1104411&r1=1104410&r2=1104411&view=diff ============================================================================== --- shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/dataservice/integration/fixtures/ActivityEntryJsonIds.json (original) +++ shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/dataservice/integration/fixtures/ActivityEntryJsonIds.json Tue May 17 17:03:54 2011 @@ -3,77 +3,81 @@ "totalResults":2, "entry":[ { - "title":"John Doe posted a new video to his album.", - "verb":"post", - "target":{ - "id":"tag:example.org,2011:abc123", - "image":{ - "height":250, - "width":250, - "url":"http://example.org/album/thumbnail.jpg" - }, - "displayName":"John's Photo Album", - "objectType":"http://activitystrea.ms/schema/1.0/photo-album", - "url":"http://example.org/album/" - }, - "generator":{ - "url":"http://example.org/activities-app" - }, - "postedTime":"2011-02-10T15:04:55Z", - "provider":{ - "url":"http://example.org/activity-stream" - }, - "actor":{ - "id":"john.doe", - "image":{ - "height":250, - "width":250, - "url":"http://example.org/john/image" - }, - "displayName":"John Doe", - "objectType":"person", - "url":"http://example.org/john" - }, - "object":{ - "upstreamDuplicates":[ - "upstreamId1", - "upstreamId2" - ], - "id":"object1", - "image":{ - "height":250, - "width":250, - "url":"http://example.org/album/my_fluffy_cat_thumb.jpg" - }, - "summary": "<body>My activity summary.</body>", - "objectType":"http://activitystrea.ms/schema/1.0/photo", - "url":"http://example.org/album/my_fluffy_cat.jpg", - "attachedObjects":[ - { - "id":"attached1", - "url":"http://example.org/attached1" - }, - { - "id":"attached2", - "url":"http://example.org/attached2" - } - ] - }, - "openSocial":{} - }, - { - "title":"Super simple ActivityEntry", - "verb":"post", - "postedTime":"2010-04-27T06:02:36+0000", - "actor":{ - "id":"john.doe", - "displayName":"John Doe" - }, - "object":{ - "id":"object2", - "displayName":"Super simple ActivityObject", - "objectType":"article" - } + "id": "activity1", + "title": "John posted a new blog entry", + "published": "2011-02-10T15:04:55Z", + "actor": { + "url": "http://example.org/john", + "objectType" : "person", + "id": "john.doe", + "image": { + "url": "http://example.org/john/image", + "width": 250, + "height": 250 + }, + "displayName": "John Doe" + }, + "verb": "post", + "object" : { + "url": "http://example.org/blog/2011/02/entry", + "id": "object1" + }, + "target" : { + "url": "http://example.org/blog/", + "objectType": "blog", + "id": "target1", + "displayName": "John's Blog" + } + }, { + "id": "activity2", + "published": "2011-02-10T15:04:55Z", + "generator": { + "url": "http://example.org/activities-app" + }, + "provider": { + "url": "http://example.org/activity-stream" + }, + "title": "John posted a new video to his album.", + "actor": { + "url": "http://example.org/john", + "objectType": "person", + "id": "john.doe", + "image": { + "url": "http://example.org/john/image", + "width": 250, + "height": 250 + }, + "displayName": "John Doe" + }, + "verb": "post", + "object" : { + "url": "http://example.org/album/my_fluffy_cat.jpg", + "objectType": "photo", + "id": "object2", + "summary": "Photo posted", + "image": { + "url": "http://example.org/album/my_fluffy_cat_thumb.jpg", + "width": 250, + "height": 250 + }, + "upstreamDuplicates" : ["upstream1", "upstream2"], + "downstreamDuplicates" : ["downstream1", "downstream2"], + "attachments": [ + {"id": "attachment1", "objectType": "attachment"}, + {"id": "attachment2", "objectType": "attachment"} + ] + }, + "target": { + "url": "http://example.org/album/", + "objectType": "photo-album", + "id": "target2", + "displayName": "John's Photo Album", + "image": { + "url": "http://example.org/album/thumbnail.jpg", + "width": 250, + "height": 250 + } + } } ], "itemsPerPage":2
Modified: shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/dataservice/integration/fixtures/ActivityEntryJsonUpdated.json URL: http://svn.apache.org/viewvc/shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/dataservice/integration/fixtures/ActivityEntryJsonUpdated.json?rev=1104411&r1=1104410&r2=1104411&view=diff ============================================================================== --- shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/dataservice/integration/fixtures/ActivityEntryJsonUpdated.json (original) +++ shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/dataservice/integration/fixtures/ActivityEntryJsonUpdated.json Tue May 17 17:03:54 2011 @@ -1,75 +1,8 @@ { - "startIndex":0, - "totalResults":2, - "entry":[ - { - "title":"John Doe posted a new video to his album.", - "verb":"post", - "target":{ - "id":"tag:example.org,2011:abc123", - "image":{ - "height":250, - "width":250, - "url":"http://example.org/album/thumbnail.jpg" - }, - "displayName":"John's Photo Album", - "objectType":"http://activitystrea.ms/schema/1.0/photo-album", - "url":"http://example.org/album/" - }, - "generator":{ - "url":"http://example.org/activities-app" - }, - "postedTime":"2011-02-10T15:04:55Z", - "provider":{ - "url":"http://example.org/activity-stream" - }, - "actor":{ - "id":"john.doe", - "image":{ - "height":250, - "width":250, - "url":"http://example.org/john/image" - }, - "displayName":"John Doe", - "objectType":"person", - "url":"http://example.org/john" - }, - "object":{ - "summary": "<body>My activity summary.</body>", - "upstreamDuplicates":[ - "upstreamId1", - "upstreamId2" - ], - "id":"object1", - "image":{ - "height":250, - "width":250, - "url":"http://example.org/album/my_fluffy_cat_thumb.jpg" - }, - "objectType":"http://activitystrea.ms/schema/1.0/photo", - "url":"http://example.org/album/my_fluffy_cat.jpg", - "attachedObjects":[ - { - "id":"attached1", - "url":"http://example.org/attached1" - }, - { - "id":"attached2", - "url":"http://example.org/attached2" - } - ] - }, - "openSocial":{} - }, - { - "title":"Super Updated Activity", - "actor":{ - "id":"john.doe", - }, - "object":{ - "id":"object2", - } - } - ], - "itemsPerPage":2 + "entry": { + "id": "activity2", + "title" : "Super Updated Activity", + "actor": {"id": "john.doe"}, + "object" : {"id": "object2"} + } } \ No newline at end of file Modified: shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/dataservice/integration/fixtures/ActivityEntryXmlId.xml URL: http://svn.apache.org/viewvc/shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/dataservice/integration/fixtures/ActivityEntryXmlId.xml?rev=1104411&r1=1104410&r2=1104411&view=diff ============================================================================== --- shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/dataservice/integration/fixtures/ActivityEntryXmlId.xml (original) +++ shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/dataservice/integration/fixtures/ActivityEntryXmlId.xml Tue May 17 17:03:54 2011 @@ -1,12 +1,11 @@ -<?xml version="1.0" encoding="UTF-8"?> -<response xmlns="http://ns.opensocial.org/2008/opensocial"> -<activityEntry xmlns="http://ns.opensocial.org/2008/opensocial"> +<?xml version="1.0" encoding="UTF-8"?><response xmlns="http://ns.opensocial.org/2008/opensocial"><activityEntry xmlns="http://ns.opensocial.org/2008/opensocial"> <actor> <displayName>John Doe</displayName> <id>john.doe</id> <image> <height>250</height> <url>http://example.org/john/image</url> + <width>250</width> </image> <objectType>person</objectType> @@ -14,45 +13,55 @@ </actor> <generator> <url>http://example.org/activities-app</url> + </generator> + <id>activity2</id> <object> + <attachments> + <object> + <id>attachment1</id> + <objectType>attachment</objectType> + + </object> + <object> + <id>attachment2</id> + <objectType>attachment</objectType> + </object> + </attachments> + <downstreamDuplicate>downstream1</downstreamDuplicate> + + <downstreamDuplicate>downstream2</downstreamDuplicate> + <id>object2</id> + <summary>Photo posted</summary> <image> <height>250</height> <url>http://example.org/album/my_fluffy_cat_thumb.jpg</url> <width>250</width> + </image> - <summary><body>My activity summary.</body></summary> - <attachedObjects> - <object> - <id>attached1</id> - <url>http://example.org/attached1</url> - </object> - <object> - <id>attached2</id> - <url>http://example.org/attached2</url> - </object> - </attachedObjects> - <id>object1</id> - <objectType>http://activitystrea.ms/schema/1.0/photo</objectType> - <upstreamDuplicates>upstreamId1</upstreamDuplicates> - <upstreamDuplicates>upstreamId2</upstreamDuplicates> + <objectType>photo</objectType> + <upstreamDuplicate>upstream1</upstreamDuplicate> + <upstreamDuplicate>upstream2</upstreamDuplicate> <url>http://example.org/album/my_fluffy_cat.jpg</url> </object> - <postedTime>2011-02-10T15:04:55Z</postedTime> <provider> + <url>http://example.org/activity-stream</url> </provider> + <published>2011-02-10T15:04:55Z</published> <target> <displayName>John's Photo Album</displayName> - <id>tag:example.org,2011:abc123</id> + <id>target2</id> + <image> <height>250</height> <url>http://example.org/album/thumbnail.jpg</url> <width>250</width> </image> - <objectType>http://activitystrea.ms/schema/1.0/photo-album</objectType> + <objectType>photo-album</objectType> <url>http://example.org/album/</url> + </target> - <title>John Doe posted a new video to his album.</title> + <title>John posted a new video to his album.</title> <verb>post</verb> </activityEntry></response> \ No newline at end of file Modified: shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/dataservice/integration/fixtures/ActivityEntryXmlIds.xml URL: http://svn.apache.org/viewvc/shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/dataservice/integration/fixtures/ActivityEntryXmlIds.xml?rev=1104411&r1=1104410&r2=1104411&view=diff ============================================================================== --- shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/dataservice/integration/fixtures/ActivityEntryXmlIds.xml (original) +++ shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/dataservice/integration/fixtures/ActivityEntryXmlIds.xml Tue May 17 17:03:54 2011 @@ -1,4 +1,4 @@ -<response xmlns="http://ns.opensocial.org/2008/opensocial"> +<?xml version="1.0" encoding="UTF-8"?><response xmlns="http://ns.opensocial.org/2008/opensocial"> <itemsPerPage>2</itemsPerPage> <startIndex>0</startIndex> <totalResults>2</totalResults> @@ -20,71 +20,90 @@ <objectType>person</objectType> <url>http://example.org/john</url> </actor> + <id>activity1</id> + <title>John posted a new blog entry</title> + <object> + <id>object1</id> + <url>http://example.org/blog/2011/02/entry</url> + </object> + <published>2011-02-10T15:04:55Z</published> + <target> + <displayName>John's Blog</displayName> + + <id>target1</id> + <objectType>blog</objectType> + <url>http://example.org/blog/</url> + </target> + <verb>post</verb> + </activityEntry> + </entry> + + <entry> + <activityEntry> + <actor> + <displayName>John Doe</displayName> + <id>john.doe</id> + <image> + <height>250</height> + + <url>http://example.org/john/image</url> + <width>250</width> + </image> + <objectType>person</objectType> + <url>http://example.org/john</url> + </actor> <generator> <url>http://example.org/activities-app</url> </generator> + <id>activity2</id> <object> - <attachedObjects> + <attachments> <object> - <id>attached1</id> - <url>http://example.org/attached1</url> + <id>attachment1</id> + + <objectType>attachment</objectType> </object> <object> - <id>attached2</id> - <url>http://example.org/attached2</url> + <id>attachment2</id> + <objectType>attachment</objectType> </object> - </attachedObjects> - <id>object1</id> - <summary><body>My activity summary.</body></summary> + </attachments> + + <downstreamDuplicate>downstream1</downstreamDuplicate> + <downstreamDuplicate>downstream2</downstreamDuplicate> + <id>object2</id> + <summary>Photo posted</summary> <image> <height>250</height> <url>http://example.org/album/my_fluffy_cat_thumb.jpg</url> + <width>250</width> </image> - <objectType>http://activitystrea.ms/schema/1.0/photo</objectType> - <upstreamDuplicates>upstreamId1</upstreamDuplicates> - - <upstreamDuplicates>upstreamId2</upstreamDuplicates> + <objectType>photo</objectType> + <upstreamDuplicate>upstream1</upstreamDuplicate> + <upstreamDuplicate>upstream2</upstreamDuplicate> <url>http://example.org/album/my_fluffy_cat.jpg</url> + </object> - <postedTime>2011-02-10T15:04:55Z</postedTime> <provider> <url>http://example.org/activity-stream</url> </provider> - + <published>2011-02-10T15:04:55Z</published> <target> <displayName>John's Photo Album</displayName> - <id>tag:example.org,2011:abc123</id> + + <id>target2</id> <image> <height>250</height> <url>http://example.org/album/thumbnail.jpg</url> - <width>250</width> </image> - <objectType>http://activitystrea.ms/schema/1.0/photo-album</objectType> + <objectType>photo-album</objectType> + <url>http://example.org/album/</url> </target> - <title>John Doe posted a new video to his album.</title> - <verb>post</verb> - - </activityEntry> - </entry> - <entry> - <activityEntry> - <actor> - <displayName>John Doe</displayName> - <id>john.doe</id> - </actor> - - <object> - <displayName>Super simple ActivityObject</displayName> - <id>object2</id> - <objectType>article</objectType> - </object> - <postedTime>2010-04-27T06:02:36+0000</postedTime> - <title>Super simple ActivityEntry</title> - + <title>John posted a new video to his album.</title> <verb>post</verb> </activityEntry> </entry> Modified: shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/dataservice/integration/fixtures/ActivityStreamsSupportedFields.json URL: http://svn.apache.org/viewvc/shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/dataservice/integration/fixtures/ActivityStreamsSupportedFields.json?rev=1104411&r1=1104410&r2=1104411&view=diff ============================================================================== --- shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/dataservice/integration/fixtures/ActivityStreamsSupportedFields.json (original) +++ shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/dataservice/integration/fixtures/ActivityStreamsSupportedFields.json Tue May 17 17:03:54 2011 @@ -1,15 +1,17 @@ { "entry":[ "actor", - "body", + "content", "generator", "icon", + "id", "object", - "postedTime", + "published", "provider", "target", "title", - "updatedTime", + "updated", + "url", "verb" ] } \ No newline at end of file Modified: shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/opensocial/service/ActivityStreamHandlerTest.java URL: http://svn.apache.org/viewvc/shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/opensocial/service/ActivityStreamHandlerTest.java?rev=1104411&r1=1104410&r2=1104411&view=diff ============================================================================== --- shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/opensocial/service/ActivityStreamHandlerTest.java (original) +++ shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/opensocial/service/ActivityStreamHandlerTest.java Tue May 17 17:03:54 2011 @@ -179,7 +179,7 @@ public class ActivityStreamHandlerTest e org.easymock.EasyMock.expect(service.createActivityEntry(eq(JOHN_DOE.iterator().next()), eq(new GroupId(GroupId.Type.self, null)), eq("appId"), eq(ImmutableSet.<String>of()), - eq(entry), eq(token))).andReturn(ImmediateFuture.newInstance((Void) null)); + eq(entry), eq(token))).andReturn(ImmediateFuture.newInstance((ActivityEntry) null)); replay(); return operation.execute(Maps.<String, String[]>newHashMap(), @@ -199,7 +199,7 @@ public class ActivityStreamHandlerTest e org.easymock.EasyMock.expect(service.createActivityEntry(eq(JOHN_DOE.iterator().next()), eq(new GroupId(GroupId.Type.self, null)), eq("appId"), eq(ImmutableSet.<String>of()), - eq(entry), eq(token))).andReturn(ImmediateFuture.newInstance((Void) null)); + eq(entry), eq(token))).andReturn(ImmediateFuture.newInstance((ActivityEntry) null)); replay(); Future<?> future = operation.execute(Maps.<String, String[]>newHashMap(), @@ -222,7 +222,7 @@ public class ActivityStreamHandlerTest e org.easymock.EasyMock.expect(service.updateActivityEntry(eq(JOHN_DOE.iterator().next()), eq(new GroupId(GroupId.Type.self, null)), eq("appId"), eq(ImmutableSet.<String>of()), - eq(entry), eq("testObject"), eq(token))).andReturn(ImmediateFuture.newInstance((Void) null)); + eq(entry), eq("testObject"), eq(token))).andReturn(ImmediateFuture.newInstance((ActivityEntry) null)); replay(); Future<?> future = operation.execute(Maps.<String, String[]>newHashMap(), Modified: shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/sample/spi/JsonDbOpensocialServiceTest.java URL: http://svn.apache.org/viewvc/shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/sample/spi/JsonDbOpensocialServiceTest.java?rev=1104411&r1=1104410&r2=1104411&view=diff ============================================================================== --- shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/sample/spi/JsonDbOpensocialServiceTest.java (original) +++ shindig/trunk/java/social-api/src/test/java/org/apache/shindig/social/sample/spi/JsonDbOpensocialServiceTest.java Tue May 17 17:03:54 2011 @@ -295,11 +295,11 @@ public class JsonDbOpensocialServiceTest @Test public void testGetExpectedActivityEntry() throws Exception { ActivityEntry entry = db.getActivityEntry(JOHN_DOE, SELF_GROUP, APP_ID, - ImmutableSet.of("title"), "object1", new FakeGadgetToken()).get(); + ImmutableSet.of("title"), "activity2", new FakeGadgetToken()).get(); assertNotNull(entry); // Check that some fields are fetched and others are not assertNotNull(entry.getTitle()); - assertNull(entry.getPostedTime()); + assertNull(entry.getPublished()); } @Test
