JAL-3863 passing test to verify a uniprot accession with canonical flag set is transf...
[jalview.git] / test / jalview / datamodel / SequenceTest.java
index 129d7b3..5ae7dd9 100644 (file)
@@ -2175,4 +2175,15 @@ public class SequenceTest
     assertEquals(0, seq.firstResidueOutsideIterator(cs.iterator()));
 
   }
+  @Test(groups= {"Functional"})
+  public void testTransferAnnotation() {
+    Sequence origSeq = new Sequence("MYSEQ","THISISASEQ");
+    Sequence toSeq = new Sequence("MYSEQ","THISISASEQ");
+    origSeq.addDBRef(new DBRefEntry("UNIPROT", "0", "Q12345", null, true));
+    toSeq.transferAnnotation(origSeq, null);
+    assertTrue(toSeq.getDBRefs().size()>0);
+    
+    assertTrue(toSeq.getDBRefs().get(0).isCanonical());
+    
+  }
 }