import jalview.datamodel.SequenceGroup;
import jalview.gui.AlignFrame;
+import jalview.gui.JvOptionPane;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
public class JalviewExportPropertiesTests
{
+ @BeforeClass(alwaysRun = true)
+ public void setUpJvOptionPane()
+ {
+ JvOptionPane.setInteractiveMode(false);
+ JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION);
+ }
+
/**
* @throws java.lang.Exception
*/
@BeforeClass(alwaysRun = true)
public static void setUpBeforeClass() throws Exception
{
- jalview.bin.Jalview.main(new String[]
- { "-props", "test/jalview/io/testProps.jvprops" });
+ jalview.bin.Jalview.main(new String[] { "-props",
+ "test/jalview/io/testProps.jvprops" });
}
/**
* @throws java.lang.Exception
*/
- @AfterClass
+ @AfterClass(alwaysRun = true)
public static void tearDownAfterClass() throws Exception
{
jalview.gui.Desktop.instance.closeAll_actionPerformed(null);
}
- @Test(groups ={ "Functional" })
+
+ @Test(groups = { "Functional" })
public void testImportExportPeriodGaps() throws Exception
{
jalview.bin.Cache.setProperty("GAP_SYMBOL", ".");
assertTrue("Couldn't set gap character to '.'",
".".equals("" + jalview.bin.Cache.getProperty("GAP_SYMBOL")));
AlignFrame af = new jalview.io.FileLoader().LoadFileWaitTillLoaded(
- "examples/uniref50.fa", FormatAdapter.FILE);
+ "examples/uniref50.fa", DataSourceType.FILE);
assertTrue("Didn't read in the example file correctly.", af != null);
assertTrue("Didn't set the gap character correctly", af.getViewport()
.getAlignment().getSequenceAt(0).getCharAt(5) == '.');
SequenceGroup sg = new SequenceGroup();
- sg.addSequence(af.getViewport().getAlignment().getSequenceAt(0),false);
- sg.addSequence(af.getViewport().getAlignment().getSequenceAt(1),false);
+ sg.addSequence(af.getViewport().getAlignment().getSequenceAt(0), false);
+ sg.addSequence(af.getViewport().getAlignment().getSequenceAt(1), false);
sg.setStartRes(1);
sg.setEndRes(7);
af.getViewport().setSelectionGroup(sg);
String fseqs = new FormatAdapter(af.alignPanel).formatSequences(
- "FASTA", af.alignPanel, true);
+ FileFormat.Fasta, af.alignPanel, true);
assertTrue("Couldn't find '.' in the exported region\n" + fseqs,
fseqs.indexOf(".") > -1);
}