JAL-2808 refine FeatureMatcher interface and matcher toString methods
[jalview.git] / test / jalview / datamodel / features / FeatureMatcherSetTest.java
index a98013b..56644fd 100644 (file)
@@ -11,6 +11,7 @@ import jalview.util.matcher.Condition;
 
 import java.util.HashMap;
 import java.util.Iterator;
+import java.util.Locale;
 import java.util.Map;
 
 import org.testng.annotations.Test;
@@ -111,14 +112,14 @@ public class FeatureMatcherSetTest
   @Test(groups = "Functional")
   public void testToString()
   {
+    Locale.setDefault(Locale.ENGLISH);
     FeatureMatcherI fm1 = FeatureMatcher.byAttribute(Condition.LT, "1.2",
             "AF");
     assertEquals(fm1.toString(), "AF < 1.2");
 
     FeatureMatcher fm2 = FeatureMatcher.byAttribute(Condition.NotContains,
-            "path",
-            "CLIN_SIG");
-    assertEquals(fm2.toString(), "CLIN_SIG Does not contain 'PATH'");
+            "path", "CLIN_SIG");
+    assertEquals(fm2.toString(), "CLIN_SIG does not contain 'path'");
 
     /*
      * AND them
@@ -129,7 +130,7 @@ public class FeatureMatcherSetTest
     assertEquals(fms.toString(), "(AF < 1.2)");
     fms.and(fm2);
     assertEquals(fms.toString(),
-            "(AF < 1.2) AND (CLIN_SIG Does not contain 'PATH')");
+            "(AF < 1.2) and (CLIN_SIG does not contain 'path')");
 
     /*
      * OR them
@@ -140,7 +141,7 @@ public class FeatureMatcherSetTest
     assertEquals(fms.toString(), "(AF < 1.2)");
     fms.or(fm2);
     assertEquals(fms.toString(),
-            "(AF < 1.2) OR (CLIN_SIG Does not contain 'PATH')");
+            "(AF < 1.2) or (CLIN_SIG does not contain 'path')");
 
     try
     {
@@ -265,7 +266,7 @@ public class FeatureMatcherSetTest
     assertFalse(fms.matches(sf));
     csq.put("Consequence", "junk");
     assertFalse(fms.matches(sf));
-  
+
     /*
      * a string pattern matcher
      */