Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
佳 邓
Gitlab4j Api
Commits
e28df487
Commit
e28df487
authored
Aug 12, 2017
by
Greg Messner
Browse files
Added test for fetching events with dates (#60).
parent
194c3719
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/test/java/org/gitlab4j/api/TestEventsApi.java
View file @
e28df487
package
org.gitlab4j.api
;
package
org.gitlab4j.api
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
import
static
org
.
junit
.
Assert
.
assertNotNull
;
import
static
org
.
junit
.
Assert
.
assertNotNull
;
import
static
org
.
junit
.
Assume
.
assumeTrue
;
import
static
org
.
junit
.
Assume
.
assumeTrue
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
org.gitlab4j.api.GitLabApi.ApiVersion
;
import
org.gitlab4j.api.GitLabApi.ApiVersion
;
...
@@ -81,6 +83,19 @@ public class TestEventsApi {
...
@@ -81,6 +83,19 @@ public class TestEventsApi {
assertNotNull
(
events
);
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
@Test
public
void
testGetUserEvents
()
throws
GitLabApiException
{
public
void
testGetUserEvents
()
throws
GitLabApiException
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment