use of com.linkedin.restli.examples.typeref.api.CalendarRefArray in project rest.li by linkedin.
the class TestCustomTypesClient method testCalendarRefArrayQueryParam.
@Test
public void testCalendarRefArrayQueryParam() throws RemoteInvocationException {
FindRequest<Greeting> findRequest = new CustomTypesRequestBuilders().findByCalendars().addCalendarsParam(new GregorianCalendar()).build();
Response<CollectionResponse<Greeting>> response = getClient().sendRequest(findRequest).getResponse();
Assert.assertEquals(response.getEntity().getElements().size(), 0);
CalendarRefArray calendarRefArray = new CalendarRefArray();
calendarRefArray.add(new GregorianCalendar());
findRequest = new CustomTypesRequestBuilders().findByCalendars().calendarsParam(calendarRefArray).build();
response = getClient().sendRequest(findRequest).getResponse();
Assert.assertEquals(response.getEntity().getElements().size(), 0);
List<Calendar> calendars = new ArrayList<Calendar>();
calendars.add(new GregorianCalendar());
findRequest = new CustomTypesRequestBuilders().findByCalendars().calendarsParam(calendars).build();
response = getClient().sendRequest(findRequest).getResponse();
Assert.assertEquals(response.getEntity().getElements().size(), 0);
}
Aggregations