import java.util.Vector;
+import jalview.datamodel.Alignment;
+import jalview.datamodel.AlignmentI;
import jalview.datamodel.SequenceI;
import org.junit.Test;
@Test
public void test() throws Exception
{
- PDBFileWithJmol jtest=new PDBFileWithJmol("./examples/1vsp", jalview.io.AppletFormatAdapter.FILE);
+ PDBFileWithJmol jtest=new PDBFileWithJmol("./examples/1GAQ.txt", jalview.io.AppletFormatAdapter.FILE);
Vector<SequenceI> seqs=jtest.getSeqs();
- assertTrue("No sequences extracted from testfile", seqs!=null && seqs.size()>0);
- assertTrue("No annotation generated.", seqs.get(0).getAnnotation()!=null && seqs.get(0).getAnnotation().length!=0);
+ assertTrue("No sequences extracted from testfile\n"+(jtest.hasWarningMessage() ? jtest.getWarningMessage(): "(No warnings raised)"), seqs!=null && seqs.size()>0);
+ for (SequenceI sq:seqs)
+ {
+ AlignmentI al = new Alignment(new SequenceI[] { sq});
+ if (!al.isNucleotide())
+ {
+ assertTrue("No secondary structure assigned for protein sequence.",sq.getAnnotation()!=null && sq.getAnnotation().length>=1 && sq.getAnnotation()[0].hasIcons);
+ }
+ }
}
}