package jalview.ext.jmol;
import static org.testng.AssertJUnit.assertEquals;
+import static org.testng.AssertJUnit.assertNotNull;
import static org.testng.AssertJUnit.assertTrue;
import jalview.bin.Cache;
assertEquals('H', structCode[4]);
assertEquals('E', structCode[5]);
}
+
+ @Test(groups = "Functional")
+ public void testLocalPDBId() throws Exception
+ {
+ JmolParser structureData;
+ /*
+ * reads a local structure
+ */
+ structureData = new JmolParser("examples/testdata/localstruct.pdb",
+ AppletFormatAdapter.FILE);
+ assertNotNull(structureData);
+ /*
+ * local structure files should yield a false ID based on the filename
+ */
+ assertNotNull(structureData.getId());
+ assertEquals(structureData.getId(), "localstruct.pdb");
+ assertNotNull(structureData.getSeqs());
+ /*
+ * the ID is also the group for features derived from structure data
+ */
+ assertNotNull(structureData.getSeqs().get(0).getSequenceFeatures()[0].featureGroup);
+ assertEquals(
+ structureData.getSeqs().get(0).getSequenceFeatures()[0].featureGroup,
+ "localstruct.pdb");
+
+ }
}