Merge branch 'JAL-1601-direct-jpred4-rest-service' into development/Release_2_12_Branch
[jalview.git] / test / jalview / testutils / Matchers.java
index ceb07a0..682d1bf 100644 (file)
@@ -1,7 +1,11 @@
 package jalview.testutils;
 
+import java.util.Arrays;
+import java.util.List;
+
 import org.hamcrest.Matcher;
 
+import jalview.datamodel.Annotation;
 import jalview.datamodel.SequenceI;
 
 public class Matchers
@@ -10,4 +14,21 @@ public class Matchers
   {
     return new SequenceStringMatcher(sequence);
   }
+
+  public static Matcher<SequenceI> matchesSequenceString(SequenceI sequence)
+  {
+    return new SequenceStringMatcher(sequence.getSequenceAsString());
+  }
+
+  public static Matcher<Annotation[]> matchesAnnotations(
+      List<Annotation> annotations)
+  {
+    return new AnnotationsMatcher(annotations);
+  }
+
+  public static Matcher<Annotation[]> matchesAnnotations(
+      Annotation... annotations)
+  {
+    return new AnnotationsMatcher(Arrays.asList(annotations));
+  }
 }