Search in sources :

Example 1 with PersonContainerElement

use of com.hack23.cia.model.external.riksdagen.personlista.impl.PersonContainerElement in project cia by Hack23.

the class RiksdagenPersonApiImplITest method getPersonMixedTest.

/**
 * Gets the person mixed test.
 *
 * @return the person mixed test
 * @throws Exception
 *             the exception
 */
@Test
public void getPersonMixedTest() throws Exception {
    final PersonContainerElement personList = riksdagenApi.getPersonList();
    assertNotNull(personList);
    assertTrue(personList.getPerson().size() >= 1291);
    final PersonElement person = personList.getPerson().get(0);
    assertNotNull("Missing id : " + person.getLastName(), person.getId());
    final PersonData personDetail = riksdagenApi.getPerson(person.getId());
    assertNotNull("Missing personDetail : " + person.getLastName(), personDetail);
    assertNotNull("Missing personDetail.person : " + person.getLastName(), personDetail.getLastName());
    assertNotNull("Missing personDetail.person.id : " + person.getLastName(), personDetail.getId());
    assertNotNull(personDetail.getFirstName());
    assertNotNull(personDetail.getLastName());
}
Also used : PersonElement(com.hack23.cia.model.external.riksdagen.personlista.impl.PersonElement) PersonData(com.hack23.cia.model.external.riksdagen.person.impl.PersonData) PersonContainerElement(com.hack23.cia.model.external.riksdagen.personlista.impl.PersonContainerElement) Test(org.junit.Test)

Example 2 with PersonContainerElement

use of com.hack23.cia.model.external.riksdagen.personlista.impl.PersonContainerElement in project cia by Hack23.

the class RiksdagenPersonApiImplITest method getPersonListTest.

/**
 * Gets the person list test.
 *
 * @return the person list test
 * @throws Exception
 *             the exception
 */
@Test
public void getPersonListTest() throws Exception {
    final PersonContainerElement personList = riksdagenApi.getPersonList();
    assertNotNull(personList);
    assertTrue(personList.getPerson().size() >= 1291);
}
Also used : PersonContainerElement(com.hack23.cia.model.external.riksdagen.personlista.impl.PersonContainerElement) Test(org.junit.Test)

Aggregations

PersonContainerElement (com.hack23.cia.model.external.riksdagen.personlista.impl.PersonContainerElement)2 Test (org.junit.Test)2 PersonData (com.hack23.cia.model.external.riksdagen.person.impl.PersonData)1 PersonElement (com.hack23.cia.model.external.riksdagen.personlista.impl.PersonElement)1