Skip to content
Snippets Groups Projects
Commit c925adef authored by Stefan E. Funk's avatar Stefan E. Funk
Browse files

1;95;0ctest: testing the tesrt

parent c93d5c6c
No related branches found
No related tags found
No related merge requests found
Pipeline #347473 failed
......@@ -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 testOaiDatestampAsString() throws ParseException {
public void testGetUTCDatestampAsString() 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 testGetCurrentUTCDate() throws DatatypeConfigurationException, ParseException {
public void testIsCorrectFromUntilDate() throws DatatypeConfigurationException, ParseException {
String date = "1970-12-10T18:30:00";
List<String> result = new ArrayList<String>();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment