summaryrefslogtreecommitdiff
path: root/support/arara/source/src/test/kotlin/org/islandoftex/arara/localization/LanguageTest.kt
diff options
context:
space:
mode:
Diffstat (limited to 'support/arara/source/src/test/kotlin/org/islandoftex/arara/localization/LanguageTest.kt')
-rw-r--r--support/arara/source/src/test/kotlin/org/islandoftex/arara/localization/LanguageTest.kt20
1 files changed, 20 insertions, 0 deletions
diff --git a/support/arara/source/src/test/kotlin/org/islandoftex/arara/localization/LanguageTest.kt b/support/arara/source/src/test/kotlin/org/islandoftex/arara/localization/LanguageTest.kt
new file mode 100644
index 0000000000..92d38ebc9b
--- /dev/null
+++ b/support/arara/source/src/test/kotlin/org/islandoftex/arara/localization/LanguageTest.kt
@@ -0,0 +1,20 @@
+// SPDX-License-Identifier: BSD-3-Clause
+package org.islandoftex.arara.localization
+
+import io.kotlintest.shouldBe
+import io.kotlintest.shouldThrow
+import io.kotlintest.specs.ShouldSpec
+import java.util.Locale
+import org.islandoftex.arara.model.AraraException
+
+class LanguageTest : ShouldSpec({
+ should("instantiate with known code") {
+ Language("en").locale shouldBe Locale.ENGLISH
+ }
+
+ should("throw on unknown language") {
+ shouldThrow<AraraException> {
+ Language("quack")
+ }
+ }
+})