Skip to content

Commit

Permalink
Merge pull request #664 from apache/remove-dead-mapper-code
Browse files Browse the repository at this point in the history
Remove disabled test and corresponding dead code in Mapper
  • Loading branch information
bdemers authored Sep 13, 2024
2 parents 6f40ce8 + b6c817d commit 18df413
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,6 @@ public class Mapper {
public Mapper() {
}

public String convertDateTime(Instant instant) {
return iso8601DateTimeFormatter.format(instant);
}

/**
* Converts an ISO 8601 DateTime string into the equivalent Java Date object.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@

package org.apache.directory.scim.spec.schema;

import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.MethodSource;

Expand Down Expand Up @@ -57,21 +55,4 @@ public void testConvertDateTimeFromString(String isoDateTime) throws ParseExcept
assertEquals(37, calendar.get(Calendar.MINUTE));
assertEquals(17, calendar.get(Calendar.SECOND));
}

@Test
@Disabled
public void convertDateTimeFromDate() {
Mapper mapper = new Mapper();
TimeZone timeZone = new SimpleTimeZone(0, "GMT");
GregorianCalendar calendar = new GregorianCalendar(timeZone);
calendar.set(Calendar.YEAR, 2015);
calendar.set(Calendar.MONTH, 03);
calendar.set(Calendar.DATE, 26);
calendar.set(Calendar.HOUR_OF_DAY, 1);
calendar.set(Calendar.MINUTE, 37);
calendar.set(Calendar.SECOND, 17);
Instant instant = calendar.toInstant();
String actualDateTime = mapper.convertDateTime(instant);
assertEquals(ISO_DATETIME_EXAMPLES[0], actualDateTime);
}
}

0 comments on commit 18df413

Please sign in to comment.