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
04d7e085
Commit
04d7e085
authored
Mar 12, 2018
by
Greg Messner
Browse files
Initial commit (#151).
parent
5a887c95
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/test/java/org/gitlab4j/api/TestISO8601.java
0 → 100644
View file @
04d7e085
package
org.gitlab4j.api
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
import
java.text.ParseException
;
import
java.util.Date
;
import
org.gitlab4j.api.utils.ISO8601
;
import
org.junit.Test
;
public
class
TestISO8601
{
private
static
final
String
SPACEY_GITLAB_DATE
=
"2018-03-12 10:16:46 +0800"
;
private
static
final
String
ISO8601_GITLAB_DATE
=
"2018-03-12T10:16:46+0800"
;
@Test
public
void
testGitlabDateParse
()
throws
ParseException
{
Date
spaceyDate
=
ISO8601
.
toDate
(
SPACEY_GITLAB_DATE
);
Date
gitlabDate
=
ISO8601
.
toDate
(
ISO8601_GITLAB_DATE
);
assertEquals
(
spaceyDate
,
gitlabDate
);
}
}
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