From: Jim Procter Date: Fri, 6 Apr 2018 10:00:02 +0000 (+0100) Subject: failing test for JAL-2223 X-Git-Tag: Release_2_10_4~32^2~7 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=0e07457ca16b632091d64ec76934b6bf772b180c;p=jalview.git failing test for JAL-2223 --- diff --git a/test/jalview/io/Jalview2xmlTests.java b/test/jalview/io/Jalview2xmlTests.java index 6abb7e5..c0eb8c5 100644 --- a/test/jalview/io/Jalview2xmlTests.java +++ b/test/jalview/io/Jalview2xmlTests.java @@ -247,6 +247,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 { @@ -413,7 +438,7 @@ public class Jalview2xmlTests extends Jalview2xmlBase String afid = af.getViewport().getSequenceSetId(); // remember reference sequence for each panel - Map refseqs = new HashMap(); + Map refseqs = new HashMap<>(); /* * mark sequence 2, 3, 4.. in panels 1, 2, 3... @@ -551,8 +576,8 @@ public class Jalview2xmlTests extends Jalview2xmlBase * remember representative and hidden sequences marked * on each panel */ - Map repSeqs = new HashMap(); - Map> hiddenSeqNames = new HashMap>(); + Map repSeqs = new HashMap<>(); + Map> hiddenSeqNames = new HashMap<>(); /* * mark sequence 2, 3, 4.. in panels 1, 2, 3... @@ -568,7 +593,7 @@ public class Jalview2xmlTests extends Jalview2xmlBase repIndex = Math.max(repIndex, 1); SequenceI repSeq = alignment.getSequenceAt(repIndex); repSeqs.put(ap.getViewName(), repSeq); - List hiddenNames = new ArrayList(); + List hiddenNames = new ArrayList<>(); hiddenSeqNames.put(ap.getViewName(), hiddenNames); /*