import static org.testng.AssertJUnit.assertTrue;
import jalview.bin.Cache;
-import jalview.bin.Instance;
import jalview.bin.Jalview;
import jalview.datamodel.AlignedCodonFrame;
import jalview.datamodel.Alignment;
/*
* remove any sequence mappings left lying around by other tests
*/
- StructureSelectionManager ssm = StructureSelectionManager
- .getStructureSelectionManager(Instance.getDesktop());
- ssm.resetAll();
+ Desktop.getInstance().getStructureSelectionManager().resetAll();
}
@BeforeMethod(alwaysRun = true)
* Verify that creating the alignment for the new View has registered the
* mappings
*/
- StructureSelectionManager ssm = StructureSelectionManager
- .getStructureSelectionManager(Instance.getDesktop());
- List<AlignedCodonFrame> sequenceMappings = ssm.getSequenceMappings();
+ List<AlignedCodonFrame> sequenceMappings = Desktop.getInstance()
+ .getStructureSelectionManager().getSequenceMappings();
assertEquals(2, sequenceMappings.size());
assertTrue(sequenceMappings.contains(acf1));
assertTrue(sequenceMappings.contains(acf2));
@Test(groups = { "Functional" })
public void testDeregisterMapping_withNoReference()
{
- Desktop d = Instance.getDesktop();
+ Desktop d = Desktop.getInstance();
assertNotNull(d);
- StructureSelectionManager ssm = StructureSelectionManager
- .getStructureSelectionManager(Instance.getDesktop());
+ StructureSelectionManager ssm = Desktop.getInstance()
+ .getStructureSelectionManager();
ssm.resetAll();
AlignFrame af1 = new FileLoader().LoadFileWaitTillLoaded(
@Test(groups = { "Functional" })
public void testDeregisterMapping_withReference()
{
- Desktop d = Instance.getDesktop();
+ Desktop d = Desktop.getInstance();
assertNotNull(d);
- StructureSelectionManager ssm = StructureSelectionManager
- .getStructureSelectionManager(Instance.getDesktop());
+ StructureSelectionManager ssm = Desktop.getInstance()
+ .getStructureSelectionManager();
ssm.resetAll();
AlignFrame af1 = new FileLoader().LoadFileWaitTillLoaded(
{
c++;
}
- ;
Assert.assertEquals(c, 1, "Expected to find one occupancy row.");
}