Author: pkluegl
Date: Thu Jan 10 16:46:40 2019
New Revision: 1850961

URL: http://svn.apache.org/viewvc?rev=1850961&view=rev
Log:
UIMA-5489: added test

Modified:
    
uima/ruta/trunk/ruta-core/src/test/java/org/apache/uima/ruta/verbalizer/ExpressionVerbalizerTest.java

Modified: 
uima/ruta/trunk/ruta-core/src/test/java/org/apache/uima/ruta/verbalizer/ExpressionVerbalizerTest.java
URL: 
http://svn.apache.org/viewvc/uima/ruta/trunk/ruta-core/src/test/java/org/apache/uima/ruta/verbalizer/ExpressionVerbalizerTest.java?rev=1850961&r1=1850960&r2=1850961&view=diff
==============================================================================
--- 
uima/ruta/trunk/ruta-core/src/test/java/org/apache/uima/ruta/verbalizer/ExpressionVerbalizerTest.java
 (original)
+++ 
uima/ruta/trunk/ruta-core/src/test/java/org/apache/uima/ruta/verbalizer/ExpressionVerbalizerTest.java
 Thu Jan 10 16:46:40 2019
@@ -24,6 +24,7 @@ import static org.junit.Assert.assertEqu
 import java.util.ArrayList;
 import java.util.List;
 
+import org.apache.uima.ruta.expression.MatchReference;
 import org.apache.uima.ruta.expression.annotation.AnnotationLabelExpression;
 import org.apache.uima.ruta.expression.annotation.AnnotationVariableExpression;
 import org.apache.uima.ruta.expression.bool.AbstractBooleanListExpression;
@@ -34,6 +35,9 @@ import org.apache.uima.ruta.expression.b
 import org.apache.uima.ruta.expression.bool.IBooleanExpression;
 import org.apache.uima.ruta.expression.bool.SimpleBooleanExpression;
 import org.apache.uima.ruta.expression.bool.SimpleBooleanListExpression;
+import org.apache.uima.ruta.expression.feature.FeatureMatchExpression;
+import org.apache.uima.ruta.expression.feature.GenericFeatureExpression;
+import org.apache.uima.ruta.expression.feature.SimpleFeatureExpression;
 import org.apache.uima.ruta.expression.number.AbstractNumberListExpression;
 import org.apache.uima.ruta.expression.number.ComposedNumberExpression;
 import org.apache.uima.ruta.expression.number.INumberExpression;
@@ -219,12 +223,21 @@ public class ExpressionVerbalizerTest {
     assertEquals("anyVar", s);
 
   }
-  
+
   @Test
   public void testAnnotationExpression() {
     RutaVerbalizer v = new RutaVerbalizer();
-    assertEquals("l" , v.verbalize(new AnnotationLabelExpression("l")));
-    assertEquals("l" , v.verbalize(new AnnotationVariableExpression("l")));
+    assertEquals("l", v.verbalize(new AnnotationLabelExpression("l")));
+    assertEquals("l", v.verbalize(new AnnotationVariableExpression("l")));
+  }
+
+  @Test
+  public void testGenericFeatureExpression() {
+    RutaVerbalizer v = new RutaVerbalizer();
+    assertEquals("abc.d", v.verbalize(new GenericFeatureExpression(
+            new SimpleFeatureExpression(new MatchReference("abc.d")))));
+    assertEquals("abc.d", v.verbalize(new GenericFeatureExpression(new 
FeatureMatchExpression(
+            new MatchReference("abc.d"), "==", new 
SimpleStringExpression("y")))));
   }
-  
+
 }


Reply via email to