org.apache.shindig.social.dataservice.integration
Class RestfulXmlActivityTest
java.lang.Object
org.junit.Assert
org.apache.shindig.common.EasyMockTestCase
org.apache.shindig.social.dataservice.integration.AbstractLargeRestfulTests
org.apache.shindig.social.dataservice.integration.RestfulXmlActivityTest
public class RestfulXmlActivityTest
- extends AbstractLargeRestfulTests
| Methods inherited from class org.apache.shindig.social.dataservice.integration.AbstractLargeRestfulTests |
abstractLargeRestfulBefore, childNodesToMap, childNodesToMapofMap, childNodesToNodeMap, getJson, getResponse, getResponse, getResponse, getResponse, getResponse, getServlet, parseXmlContent, setResponse, setServlet |
| Methods inherited from class org.junit.Assert |
assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertThat, assertThat, assertTrue, assertTrue, fail, fail |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RestfulXmlActivityTest
public RestfulXmlActivityTest()
restfulXmlActivityTestBefore
public void restfulXmlActivityTestBefore()
throws java.lang.Exception
- Throws:
java.lang.Exception
testGetActivityJson
public void testGetActivityJson()
throws java.lang.Exception
- Expected response for an activity in xml:
<response>
<activity>
<id>1</id>
<userId>john.doe</userId>
<title>yellow</title>
<body>body</body>
</activity>
</response>
- Throws:
java.lang.Exception - if test encounters an error
testGetActivitiesJson
public void testGetActivitiesJson()
throws java.lang.Exception
- Expected response for a list of activities in json:
<response xmlns="http://ns.opensocial.org/2008/opensocial"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://ns.opensocial.org/2008/opensocial file:/Users/ieb/Apache/shindig/trunk/java/social-api/src/test/resources/org/apache/shindig/social/opensocial/util/opensocial.xsd">
<activity>
<itemsPerPage>10</itemsPerPage>
<startIndex>0</startIndex>
<totalResults>1</totalResults>
<entry>
<appId></appId>
<body></body>
<bodyId></bodyId>
<externalId></externalId>
<id></id>
<mediaItems>
<mimeType></mimeType>
<type></type>
<url></url>
</mediaItems>
<postedTime></postedTime>
<priority></priority>
<streamFaviconUrl></streamFaviconUrl>
<streamSourceUrl></streamSourceUrl>
<streamTitle></streamTitle>
<streamUrl></streamUrl>
<title></title>
<titleId></titleId>
<url></url>
<userId></userId>
</entry>
</activity>
</response>
- Throws:
java.lang.Exception - if test encounters an error
testGetFriendsActivitiesJson
public void testGetFriendsActivitiesJson()
throws java.lang.Exception
- Expected response for a list of activities in json:
<?xml version="1.0" encoding="UTF-8"?>
<response xmlns="http://ns.opensocial.org/2008/opensocial"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://ns.opensocial.org/2008/opensocial file:/Users/ieb/Apache/shindig/trunk/java/social-api/src/test/resources/org/apache/shindig/social/opensocial/util/opensocial.xsd">
<activity>
<itemsPerPage>3</itemsPerPage>
<startIndex>0</startIndex>
<totalResults>10</totalResults>
<entry>
<appId></appId>
<body></body>
<bodyId></bodyId>
<externalId></externalId>
<id></id>
<mediaItems>
<mimeType></mimeType>
<type></type>
<url></url>
</mediaItems>
<postedTime></postedTime>
<priority></priority>
<streamFaviconUrl></streamFaviconUrl>
<streamSourceUrl></streamSourceUrl>
<streamTitle></streamTitle>
<streamUrl></streamUrl>
<title></title>
<titleId></titleId>
<url></url>
<userId></userId>
</entry>
</activity>
</response>
- Throws:
java.lang.Exception - if test encounters an error
testCreateActivity
public void testCreateActivity()
throws java.lang.Exception
- Throws:
java.lang.Exception
Copyright © 2007-2012 The Apache Software Foundation. All Rights Reserved.