X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=test%2Fjalview%2Fio%2FJalview2xmlTests.java;h=53bb0e7da35a3bf01f37752894256f9dc965ce42;hb=a5f48be3f383f9d2a0de386c95647c593f7db1e3;hp=e9e07828ee8c6b99ef1f9cf31430b52661267e1c;hpb=14b1b2a878190d5fffda298c4b9a901c72c74ad3;p=jalview.git diff --git a/test/jalview/io/Jalview2xmlTests.java b/test/jalview/io/Jalview2xmlTests.java index e9e0782..53bb0e7 100644 --- a/test/jalview/io/Jalview2xmlTests.java +++ b/test/jalview/io/Jalview2xmlTests.java @@ -257,6 +257,31 @@ public class Jalview2xmlTests extends Jalview2xmlBase } + /** + * Test for JAL-2223 - multiple mappings in View Mapping report + * + * @throws Exception + */ + @Test(groups = { "Functional" }) + public void noDuplicatePdbMappingsMade() throws Exception + { + StructureImportSettings.setProcessSecondaryStructure(true); + StructureImportSettings.setVisibleChainAnnotation(true); + AlignFrame af = new FileLoader().LoadFileWaitTillLoaded( + "examples/exampleFile_2_7.jar", DataSourceType.FILE); + assertNotNull(af, "Didn't read in the example file correctly."); + + // locate Jmol viewer + // count number of PDB mappings the structure selection manager holds - + String pdbFile = af.getCurrentView().getStructureSelectionManager() + .findFileForPDBId("1A70"); + assertEquals( + af.getCurrentView().getStructureSelectionManager() + .getMapping(pdbFile).length, + 2, "Expected only two mappings for 1A70"); + + } + @Test(groups = { "Functional" }) public void viewRefPdbAnnotation() throws Exception {