import jalview.api.AlignmentViewPanel;
import jalview.api.FeatureColourI;
import jalview.api.ViewStyleI;
+import jalview.bin.Jalview;
import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.AlignmentI;
import jalview.datamodel.HiddenSequences;
import jalview.schemes.StrandColourScheme;
import jalview.schemes.TCoffeeColourScheme;
import jalview.structure.StructureImportSettings;
+import jalview.structure.StructureMapping;
import jalview.util.matcher.Condition;
import jalview.viewmodel.AlignmentViewport;
public class Jalview2xmlTests extends Jalview2xmlBase
{
+ @BeforeClass(alwaysRun = true)
+ public void setUpJalviewSynchonization()
+ {
+ Jalview.setSynchronous(true);
+ }
+
@Override
@BeforeClass(alwaysRun = true)
public void setUpJvOptionPane()
assertTrue(af.isSaveAlignmentSuccessful(),
"Failed to store as a project.");
af.closeMenuItem_actionPerformed(true);
- af = null;
af = new FileLoader().LoadFileWaitTillLoaded(tfile,
DataSourceType.FILE);
assertNotNull(af, "Failed to import new project");
assertNotNull(
ColourSchemeProperty.getColourScheme(viewport,
viewport.getAlignment(),
- viewport.getGlobalColourScheme()
- .getSchemeName()),
+ viewport.getGlobalColourScheme().getSchemeName()),
"Recognise T-Coffee score from string");
af.saveAlignment(tfile, FileFormat.Jalview);
assertTrue(af.isSaveAlignmentSuccessful(),
"Failed to store as a project.");
af.closeMenuItem_actionPerformed(true);
- af = null;
af = new FileLoader().LoadFileWaitTillLoaded(tfile,
DataSourceType.FILE);
assertNotNull(af, "Failed to import new project");
// 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");
+ StructureMapping[] x = af.getCurrentView()
+ .getStructureSelectionManager()//
+ .getMapping(pdbFile);
+ assertEquals(x.length, 2, "Expected only two mappings for 1A70");
}
public void testStoreAndRecoverExpandedviews() throws Exception
{
Desktop.getInstance().closeAll_actionPerformed(null);
-
AlignFrame af = new FileLoader().LoadFileWaitTillLoaded(
"examples/exampleFile_2_7.jar", DataSourceType.FILE);
Assert.assertEquals(Desktop.getAlignFrames().length, 1);
Assert.assertEquals(Desktop.getAlignFrames().length,
Desktop.getAlignmentPanels(
af.getViewport().getSequenceSetId()).length);
- Assert.assertEquals(
- Desktop.getAlignmentPanels(
- af.getViewport().getSequenceSetId()).length,
+ Assert.assertEquals(Desktop
+ .getAlignmentPanels(af.getViewport().getSequenceSetId()).length,
oldviews);
}
{
Desktop.getInstance().closeAll_actionPerformed(null);
- // complex project - one dataset, several views on several alignments
+ // complex project - one dataset, several views on several alignment
AlignFrame af = new FileLoader(false).LoadFileWaitTillLoaded(
"examples/testdata/projects/manyViews.jvp",
DataSourceType.FILE);