-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(NotificationUtils): Add tests for getting Twilio locale.
- Loading branch information
1 parent
e241a45
commit e280eea
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
src/test/java/org/opentripplanner/middleware/utils/NotificationUtilsTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package org.opentripplanner.middleware.utils; | ||
|
||
import org.junit.jupiter.api.Assertions; | ||
import org.junit.jupiter.api.Test; | ||
|
||
import static org.opentripplanner.middleware.utils.NotificationUtils.getTwilioLocale; | ||
|
||
/** | ||
* Contains tests for the various notification utilities. | ||
* Tests in this file do not require specific environment variables | ||
* and do not contain end-to-end notification actions. | ||
*/ | ||
class NotificationUtilsTest { | ||
@Test | ||
void canGetTwilioLocale() { | ||
Assertions.assertEquals("en", getTwilioLocale("en")); | ||
Assertions.assertEquals("en", getTwilioLocale("en-US")); | ||
Assertions.assertEquals("en-GB", getTwilioLocale("en-GB")); | ||
Assertions.assertEquals("fr", getTwilioLocale("fr-FR")); | ||
Assertions.assertEquals("zh", getTwilioLocale("zh")); | ||
Assertions.assertEquals("zh-HK", getTwilioLocale("zh-HK")); | ||
Assertions.assertEquals("pt", getTwilioLocale("pt")); | ||
Assertions.assertEquals("pt-BR", getTwilioLocale("pt-BR")); | ||
} | ||
} |