summaryrefslogtreecommitdiffstats
path: root/linguistics/src/test/java/com/yahoo/language/process/StemModeTestCase.java
diff options
context:
space:
mode:
Diffstat (limited to 'linguistics/src/test/java/com/yahoo/language/process/StemModeTestCase.java')
-rw-r--r--linguistics/src/test/java/com/yahoo/language/process/StemModeTestCase.java27
1 files changed, 27 insertions, 0 deletions
diff --git a/linguistics/src/test/java/com/yahoo/language/process/StemModeTestCase.java b/linguistics/src/test/java/com/yahoo/language/process/StemModeTestCase.java
new file mode 100644
index 00000000000..13cd8a82e36
--- /dev/null
+++ b/linguistics/src/test/java/com/yahoo/language/process/StemModeTestCase.java
@@ -0,0 +1,27 @@
+// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+package com.yahoo.language.process;
+
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+
+/**
+ * @author <a href="mailto:simon@yahoo-inc.com">Simon Thoresen Hult</a>
+ */
+public class StemModeTestCase {
+
+ @Test
+ @SuppressWarnings("deprecation")
+ public void requireThatValueOfWorks() {
+ for (StemMode mode : StemMode.values()) {
+ assertEquals(mode, StemMode.valueOf(mode.getValue()));
+ }
+ }
+
+ @Test
+ @SuppressWarnings("deprecation")
+ public void requireThatValueOfUnknownIsNone() {
+ assertEquals(StemMode.NONE, StemMode.valueOf(-1));
+ }
+
+}