Skip to content

Commit 67acbc0

Browse files
author
Tom Connors
committed
Test case for non-us locale
1 parent 19e0609 commit 67acbc0

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/test/java/com/twilio/converter/DateConverterTest.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
import org.junit.Assert;
66
import org.junit.Test;
77

8+
import java.util.Locale;
9+
810
/**
911
* Test Class for {@link DateConverter}.
1012
*/
@@ -67,4 +69,11 @@ public void testLocalDateToString() {
6769
String date = DateConverter.dateStringFromLocalDate(new LocalDate(2016, 9, 21));
6870
Assert.assertEquals("2016-09-21", date);
6971
}
72+
73+
@Test
74+
public void testDifferentLocal() {
75+
Locale.setDefault(new Locale("fr", "CA"));
76+
DateTime dateTime = DateConverter.rfc2822DateTimeFromString("Tue, 29 Mar 2016 13:00:05 +0000");
77+
Assert.assertNotNull(dateTime);
78+
}
7079
}

0 commit comments

Comments
 (0)