import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
+import java.util.Locale;
import java.util.Map;
import javax.swing.JInternalFrame;
import jalview.datamodel.features.FeatureMatcherSet;
import jalview.datamodel.features.FeatureMatcherSetI;
import jalview.gui.AlignFrame;
+import jalview.gui.AlignViewport;
import jalview.gui.AlignmentPanel;
import jalview.gui.Desktop;
import jalview.gui.JvOptionPane;
import jalview.util.matcher.Condition;
import jalview.viewmodel.AlignmentViewport;
import jalview.viewmodel.seqfeatures.FeatureRendererModel;
-
+import jalview.ws.sifts.SiftsSettings;
import junit.extensions.PA;
-
@Test(singleThreaded = true)
public class Jalview2xmlTests extends Jalview2xmlBase
{
assertEquals(Desktop.getAlignFrames().length,
1 + origCount,
"Didn't gather the views in the example file.");
+
}
/**
@Test(groups = { "Functional" })
public void noDuplicatePdbMappingsMade() throws Exception
{
+ boolean oldmws = SiftsSettings.isMapWithSifts();
+ SiftsSettings.setMapWithSifts(false);
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.");
+ // TODO JAL-4107 - we need to wait a sec here whilst PDB mappings are
+ // instantiated on the alignment
+ // TODO JAL-4107 - should LoadFileWaitTillLoaded not return till *after* all
+ // that business is done ?
+
+ try {
+ Thread.sleep(1000);
+ } catch (InterruptedException foo) {}
// locate Jmol viewer
// count number of PDB mappings the structure selection manager holds -
af.getCurrentView().getStructureSelectionManager()
.getMapping(pdbFile).length,
2, "Expected only two mappings for 1A70");
+ SiftsSettings.setMapWithSifts(oldmws);
}
"Mismatch PDBEntry 'Type'");
Assert.assertNotNull(recov.getFile(),
"Recovered PDBEntry should have a non-null file entry");
+ Assert.assertEquals(recov.getFile().toLowerCase(Locale.ENGLISH).lastIndexOf("pdb"),recov.getFile().length()-3, "Recovered PDBEntry file should have PDB suffix");
}
}