summaryrefslogtreecommitdiff
path: root/src/test/java/com/p4square/ccbapi/model/GetCampusListResponseTest.java
blob: 9b635dbf30280854f22daa26d0fbdec9c6165b31 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package com.p4square.ccbapi.model;

import org.junit.Test;

import static org.junit.Assert.*;

/**
 * Tests for parsing GetCampusListResponseTest.
 */
public class GetCampusListResponseTest extends XmlBinderTestBase {

    /**
     * Assert that all of the fields bind appropriately.
     */
    @Test
    public void testGetCampusListResponse() throws Exception {
        final GetCampusListResponse response = parseFile("ccb_campus_list_response.xml",
                GetCampusListResponse.class);

        assertNull("Response should not have errors", response.getErrors());
        assertNotNull(response.getCampuses());
        assertEquals(1, response.getCampuses().size());

        final Campus campus = response.getCampuses().get(0);

        assertEquals(1, campus.getId());
        assertEquals("Sample Church", campus.getName());
        assertEquals(true, campus.isActive());
    }
}