You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by pk...@apache.org on 2016/10/06 07:31:49 UTC

svn commit: r1763507 - /uima/ruta/trunk/ruta-core/src/test/java/org/apache/uima/ruta/expression/annotation/AnnotationLabelExpressionTest.java

Author: pkluegl
Date: Thu Oct  6 07:31:49 2016
New Revision: 1763507

URL: http://svn.apache.org/viewvc?rev=1763507&view=rev
Log:
no jira - added test

Modified:
    uima/ruta/trunk/ruta-core/src/test/java/org/apache/uima/ruta/expression/annotation/AnnotationLabelExpressionTest.java

Modified: uima/ruta/trunk/ruta-core/src/test/java/org/apache/uima/ruta/expression/annotation/AnnotationLabelExpressionTest.java
URL: http://svn.apache.org/viewvc/uima/ruta/trunk/ruta-core/src/test/java/org/apache/uima/ruta/expression/annotation/AnnotationLabelExpressionTest.java?rev=1763507&r1=1763506&r2=1763507&view=diff
==============================================================================
--- uima/ruta/trunk/ruta-core/src/test/java/org/apache/uima/ruta/expression/annotation/AnnotationLabelExpressionTest.java (original)
+++ uima/ruta/trunk/ruta-core/src/test/java/org/apache/uima/ruta/expression/annotation/AnnotationLabelExpressionTest.java Thu Oct  6 07:31:49 2016
@@ -387,6 +387,20 @@ public class AnnotationLabelExpressionTe
     Assert.assertEquals("3", iterator.next().getFeatureValue(feature2).getStringValue(feature1));
     cas.release();
   }
+  
+  
+  @Test
+  public void testFeatureAssignment() throws Exception {
+    String document = "Some text.";
+    
+    String script = "CW{-> T1};\n";
+    script += "t:T1{-> t.end = 10};\n";
+    CAS cas = RutaTestUtils.getCAS(document);
+    Ruta.apply(cas, script);
+    RutaTestUtils.assertAnnotationsEquals(cas, 1, 1, "Some text.");
+  
+    cas.release();
+  }
 
   private CAS applyOnStruct4Cas(String script) throws Exception {
     String document = "Some text.";
@@ -408,4 +422,6 @@ public class AnnotationLabelExpressionTe
     Ruta.apply(cas, script);
     return cas;
   }
+  
+  
 }