Commit e28df487 authored by Greg Messner's avatar Greg Messner
Browse files

Added test for fetching events with dates (#60).

parent 194c3719
package org.gitlab4j.api;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assume.assumeTrue;
import java.util.Date;
import java.util.List;
import org.gitlab4j.api.GitLabApi.ApiVersion;
......@@ -81,6 +83,19 @@ public class TestEventsApi {
assertNotNull(events);
}
@Test
public void testGetAuthenticatedUserEventsWithDates() throws GitLabApiException {
Date after = new Date(0);
Date now = new Date();
List<Event> events = gitLabApi.getEventsApi().getAuthenticatedUserEvents(null, null, now, after, null);
assertNotNull(events);
events = gitLabApi.getEventsApi().getAuthenticatedUserEvents(null, null, after, null, null);
assertNotNull(events);
assertEquals(0, events.size());
}
@Test
public void testGetUserEvents() throws GitLabApiException {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment