import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
-import jalview.gui.AlignFrame;
-import jalview.gui.AlignmentPanel;
import jalview.io.AppletFormatAdapter;
import java.io.IOException;
"D.melanogaster.2 C.AUUCAACU.UAUGAGGAU\n" +
"#=GR D.melanogaster.2 SS ................((((\n" +
"D.melanogaster.3 G.UGGCGCU..UAUGACGCA\n" +
- "#=GR D.melanogaster.3 SS (.(((...(....(((((((\n";
+ "#=GR D.melanogaster.3 SS (.(((...(....(((((((\n" +
+ "//";
// @formatter:on
{
al = new jalview.io.FormatAdapter().readFile(TEST_DATA,
AppletFormatAdapter.PASTE, "STH");
- AlignFrame af = new AlignFrame(al, 700, 500);
- new AlignmentPanel(af, af.getViewport());
+ for (int i = 0; i < al.getSequencesArray().length; ++i)
+ {
+ al.getSequenceAt(i).setDatasetSequence(
+ al.getSequenceAt(i).createDatasetSequence());
+ al.addAnnotation(al.getSequenceAt(i).getAnnotation()[0]);
+ al.getSequenceAt(i).getAnnotation()[0].setCalcId("CalcIdFor"
+ + al.getSequenceAt(i).getName());
+ }
}
/**
public void testFindAnnotation_byCalcId()
{
Iterable<AlignmentAnnotation> anns = al
- .findAnnotation("D.melanogaster.3");
+ .findAnnotation("CalcIdForD.melanogaster.2");
Iterator<AlignmentAnnotation> iter = anns.iterator();
assertTrue(iter.hasNext());
AlignmentAnnotation ann = iter.next();
- assertEquals("D.melanogaster.3", ann.sequenceRef.getName());
+ assertEquals("D.melanogaster.2", ann.sequenceRef.getName());
assertFalse(iter.hasNext());
}
}