X-Git-Url: http://source.jalview.org/gitweb/?p=jalview.git;a=blobdiff_plain;f=test%2Fjalview%2Fio%2FJalview2xmlTests.java;fp=test%2Fjalview%2Fio%2FJalview2xmlTests.java;h=53bb0e7da35a3bf01f37752894256f9dc965ce42;hp=e9e07828ee8c6b99ef1f9cf31430b52661267e1c;hb=9f1f7839cfd50555efd3af1ff4102348f950c563;hpb=e34a4c5332c2d4d92651e0adc99ab7c5d262d13b 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 {