org.apache.shindig.social.dataservice.integration
Class RestfulJsonActivityTest

java.lang.Object
  extended by org.junit.Assert
      extended by org.apache.shindig.common.EasyMockTestCase
          extended by org.apache.shindig.social.dataservice.integration.AbstractLargeRestfulTests
              extended by org.apache.shindig.social.dataservice.integration.RestfulJsonActivityTest

public class RestfulJsonActivityTest
extends AbstractLargeRestfulTests


Field Summary
 
Fields inherited from class org.apache.shindig.social.dataservice.integration.AbstractLargeRestfulTests
injector, XMLSCHEMA, xp, XSDRESOURCE
 
Constructor Summary
RestfulJsonActivityTest()
           
 
Method Summary
 void restfulJsonActivityTestBefore()
           
 void testCreateActivity()
           
 void testGetActivitiesJson()
          Expected response for a list of activities in json: { "totalResults" : 1, "startIndex" : 0 "itemsPerPage" : 10 // Note: the js doesn't support paging.
 void testGetActivityJson()
          Expected response for an activity in json: { 'entry' : { 'id' : '1', 'userId' : 'john.doe', 'title' : 'yellow', 'body' : 'what a color!' } }
 void testGetFriendsActivitiesJson()
          Expected response for a list of activities in json: { "totalResults" : 3, "startIndex" : 0 "itemsPerPage" : 10 // Note: the js doesn't support paging.
 
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.apache.shindig.common.EasyMockTestCase
mock, mock, mock, mock, replay, replay, reset, reset, verify
 
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
 

Constructor Detail

RestfulJsonActivityTest

public RestfulJsonActivityTest()
Method Detail

restfulJsonActivityTestBefore

public void restfulJsonActivityTestBefore()
                                   throws java.lang.Exception
Throws:
java.lang.Exception

testGetActivityJson

public void testGetActivityJson()
                         throws java.lang.Exception
Expected response for an activity in json: { 'entry' : { 'id' : '1', 'userId' : 'john.doe', 'title' : 'yellow', 'body' : 'what a color!' } }

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: { "totalResults" : 1, "startIndex" : 0 "itemsPerPage" : 10 // Note: the js doesn't support paging. Should rest? "entry" : [ {} // layed out like above ] }

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: { "totalResults" : 3, "startIndex" : 0 "itemsPerPage" : 10 // Note: the js doesn't support paging. Should rest? "entry" : [ {} // layed out like above, except for jane.doe ] }

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.