Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DARIAH-DE OAI-PMH Services
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
DARIAH-DE
DARIAH-DE OAI-PMH Services
Commits
c925adef
Commit
c925adef
authored
2 years ago
by
Stefan E. Funk
Browse files
Options
Downloads
Patches
Plain Diff
1;95;0ctest: testing the tesrt
parent
c93d5c6c
No related branches found
No related tags found
No related merge requests found
Pipeline
#347473
failed
2 years ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
oaipmh-core/src/test/java/info/textgrid/middleware/test/TestOaipmhUtilities.java
+9
-5
9 additions, 5 deletions
...va/info/textgrid/middleware/test/TestOaipmhUtilities.java
with
9 additions
and
5 deletions
oaipmh-core/src/test/java/info/textgrid/middleware/test/TestOaipmhUtilities.java
+
9
−
5
View file @
c925adef
...
...
@@ -4,7 +4,6 @@ import static org.junit.Assert.assertTrue;
import
java.text.ParseException
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.concurrent.ArrayBlockingQueue
;
import
javax.xml.datatype.DatatypeConfigurationException
;
import
javax.xml.datatype.XMLGregorianCalendar
;
import
org.junit.Test
;
...
...
@@ -188,7 +187,7 @@ public class TestOaipmhUtilities {
* @throws ParseException
*/
@Test
public
void
test
Oai
DatestampAsString
()
throws
ParseException
{
public
void
test
GetUTC
DatestampAsString
()
throws
ParseException
{
String
expectedUTCDate
=
"1970-12-10T17:30:00Z"
;
String
tgDateStamp
=
"1970-12-10T18:30:00.000"
;
...
...
@@ -205,13 +204,18 @@ public class TestOaipmhUtilities {
* @throws DatatypeConfigurationException
*/
@Test
public
void
testOaiDatestampAsGregorian
()
throws
ParseException
,
DatatypeConfigurationException
{
public
void
testGetUTCDatestampAsGregorian
()
throws
ParseException
,
DatatypeConfigurationException
{
String
expectedUTCDate
=
"1970-12-10T17:30:00Z"
;
String
tgDateStamp
=
"1970-12-10T18:30:00.000"
;
String
expectedUTCDate
=
"1970-12-10T17:30:00Z"
;
XMLGregorianCalendar
utcDate
=
OaipmhUtilities
.
getUTCDatestampAsGregorian
(
tgDateStamp
);
System
.
out
.
println
(
"tgdatestamp: "
+
tgDateStamp
);
System
.
out
.
println
(
"utcdate: "
+
utcDate
);
System
.
out
.
println
(
"expectedutcdate: "
+
expectedUTCDate
);
if
(!
utcDate
.
toString
().
equals
(
expectedUTCDate
))
{
assertTrue
(
utcDate
+
" != "
+
expectedUTCDate
,
false
);
}
...
...
@@ -222,7 +226,7 @@ public class TestOaipmhUtilities {
* @throws ParseException
*/
@Test
public
void
test
GetCurrentUTC
Date
()
throws
DatatypeConfigurationException
,
ParseException
{
public
void
test
IsCorrectFromUntil
Date
()
throws
DatatypeConfigurationException
,
ParseException
{
String
date
=
"1970-12-10T18:30:00"
;
List
<
String
>
result
=
new
ArrayList
<
String
>();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment