diff options
author | Jesse Morgan <jesse@jesterpm.net> | 2018-08-19 15:57:06 -0700 |
---|---|---|
committer | Jesse Morgan <jesse@jesterpm.net> | 2018-08-19 15:57:06 -0700 |
commit | 54a7a3184dc565fe513aa520e1344b2303ea6834 (patch) | |
tree | 5f66d23cdbec36b4e9e9935688780f216caf4da7 /src/test/java/com/p4square/ccbapi/CCBAPIClientTest.java | |
parent | 9cbf7a7a27977e32c8e275d2bc660787b20ce345 (diff) |
Diffstat (limited to 'src/test/java/com/p4square/ccbapi/CCBAPIClientTest.java')
-rw-r--r-- | src/test/java/com/p4square/ccbapi/CCBAPIClientTest.java | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/test/java/com/p4square/ccbapi/CCBAPIClientTest.java b/src/test/java/com/p4square/ccbapi/CCBAPIClientTest.java index 9c7bbd6..22f9046 100644 --- a/src/test/java/com/p4square/ccbapi/CCBAPIClientTest.java +++ b/src/test/java/com/p4square/ccbapi/CCBAPIClientTest.java @@ -129,6 +129,24 @@ public class CCBAPIClientTest { assertEquals("High School Graduation", response.getItems().get(0).getName()); } + @Test + public void testGetCampusList() throws Exception { + // Set expectation. + URI expectedURI = new URI("https://localhost:8080/api.php?srv=campus_list"); + InputStream is = getClass().getResourceAsStream("model/ccb_campus_list_response.xml"); + EasyMock.expect(mockHttpClient.sendPostRequest(expectedURI, null)) + .andReturn(is); + EasyMock.replay(mockHttpClient); + + // Test significant_event_list. + GetCampusListResponse response = client.getCampusList(); + + // Verify results. + EasyMock.verify(mockHttpClient); + assertNull(response.getErrors()); + assertEquals(1, response.getCampuses().size()); + } + @Test(expected = IllegalArgumentException.class) public void testGetLookupTableListWithNullType() throws Exception { // This should throw an IllegalArgumentException. |