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

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.RestfulJsonPeopleTest

public class RestfulJsonPeopleTest
extends AbstractLargeRestfulTests


Field Summary
 
Fields inherited from class org.apache.shindig.social.dataservice.integration.AbstractLargeRestfulTests
injector, XMLSCHEMA, xp, XSDRESOURCE
 
Constructor Summary
RestfulJsonPeopleTest()
           
 
Method Summary
 void restfulJsonPeopleTestBefore()
           
 void testGetPeople()
          Expected response for a list of people in json: { "totalResults" : 3, "startIndex" : 0 "entry" : [ {}, // layed out like above {}, {}, ] }
 void testGetPeoplePagination()
           
 void testGetPersonJson()
          Expected response for john.doe's json: { 'entry' : { 'id' : 'john.doe', 'name' : {'formatted' : 'John Doe'}, 'phoneNumbers' : [ { 'number' : '+33H000000000', 'type' : 'home'}, ], 'addresses' : [ {'formatted' : 'My home address'} ], 'emails' : [ { 'value' : 'john.doe@work.bar', 'type' : 'work'}, ] ...
 
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

RestfulJsonPeopleTest

public RestfulJsonPeopleTest()
Method Detail

restfulJsonPeopleTestBefore

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

testGetPersonJson

public void testGetPersonJson()
                       throws java.lang.Exception
Expected response for john.doe's json: { 'entry' : { 'id' : 'john.doe', 'name' : {'formatted' : 'John Doe'}, 'phoneNumbers' : [ { 'number' : '+33H000000000', 'type' : 'home'}, ], 'addresses' : [ {'formatted' : 'My home address'} ], 'emails' : [ { 'value' : 'john.doe@work.bar', 'type' : 'work'}, ] ... etc, etc for all fields in the person object } } TODO: Finish up this test and make refactor so that it is easier to read

Throws:
java.lang.Exception - if test encounters an error

testGetPeople

public void testGetPeople()
                   throws java.lang.Exception
Expected response for a list of people in json: { "totalResults" : 3, "startIndex" : 0 "entry" : [ {}, // layed out like above {}, {}, ] }

Throws:
java.lang.Exception - if test encounters an error

testGetPeoplePagination

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


Copyright © 2007-2012 The Apache Software Foundation. All Rights Reserved.