Show Java version in assertion failure message.
This commit is contained in:
parent
5157875ce5
commit
8aff0a08f2
|
@ -38,6 +38,7 @@
|
||||||
|
|
||||||
import org.apache.commons.lang3.LocaleUtils;
|
import org.apache.commons.lang3.LocaleUtils;
|
||||||
import org.apache.commons.lang3.SerializationUtils;
|
import org.apache.commons.lang3.SerializationUtils;
|
||||||
|
import org.apache.commons.lang3.SystemUtils;
|
||||||
import org.apache.commons.lang3.function.TriFunction;
|
import org.apache.commons.lang3.function.TriFunction;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.junit.jupiter.params.ParameterizedTest;
|
import org.junit.jupiter.params.ParameterizedTest;
|
||||||
|
@ -130,7 +131,8 @@ static void checkParse(final Locale locale, final SimpleDateFormat sdf, final Da
|
||||||
try {
|
try {
|
||||||
final Date expectedTime = sdf.parse(formattedDate);
|
final Date expectedTime = sdf.parse(formattedDate);
|
||||||
final Date actualTime = fdf.parse(formattedDate);
|
final Date actualTime = fdf.parse(formattedDate);
|
||||||
assertEquals(expectedTime, actualTime, "locale : " + locale + " formattedDate : " + formattedDate + "\n");
|
assertEquals(expectedTime, actualTime, "locale : " + locale + ", formattedDate : " + formattedDate
|
||||||
|
+ ", Java: " + SystemUtils.JAVA_RUNTIME_VERSION + "\n");
|
||||||
} catch (final Exception e) {
|
} catch (final Exception e) {
|
||||||
fail("locale : " + locale + " formattedDate : " + formattedDate + " error : " + e + "\n", e);
|
fail("locale : " + locale + " formattedDate : " + formattedDate + " error : " + e + "\n", e);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue