git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JAL-4235 JAL-3599 Try and report Eclipse Product Version for jalviewjsTranspile....
[jalview.git]
/
test
/
jalview
/
io
/
FormatAdapterTest.java
diff --git
a/test/jalview/io/FormatAdapterTest.java
b/test/jalview/io/FormatAdapterTest.java
index
1cabc15
..
8f3ad2f
100644
(file)
--- a/
test/jalview/io/FormatAdapterTest.java
+++ b/
test/jalview/io/FormatAdapterTest.java
@@
-26,17
+26,26
@@
import static org.testng.AssertJUnit.fail;
import jalview.datamodel.AlignmentI;
import jalview.datamodel.SequenceI;
import jalview.datamodel.AlignmentI;
import jalview.datamodel.SequenceI;
+import jalview.gui.JvOptionPane;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
+import org.testng.annotations.BeforeClass;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
public class FormatAdapterTest
{
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
public class FormatAdapterTest
{
+ @BeforeClass(alwaysRun = true)
+ public void setUpJvOptionPane()
+ {
+ JvOptionPane.setInteractiveMode(false);
+ JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION);
+ }
+
/**
* Test saving and re-reading in a specified format
*
/**
* Test saving and re-reading in a specified format
*
@@
-76,15
+85,14
@@
public class FormatAdapterTest
* special case: MSF always uses '.' as gap character
*/
sequenceString = adjustForGapTreatment(sequenceString, gap, format);
* special case: MSF always uses '.' as gap character
*/
sequenceString = adjustForGapTreatment(sequenceString, gap, format);
- assertEquals(
- String.format("Sequence %d: %s", i, seqs[i].getName()),
+ assertEquals(String.format("Sequence %d: %s", i, seqs[i].getName()),
seqs[i].getSequenceAsString(), sequenceString);
i++;
}
} catch (IOException e)
{
seqs[i].getSequenceAsString(), sequenceString);
i++;
}
} catch (IOException e)
{
- fail(String
- .format("Format %s failed with %s", format, e.getMessage()));
+ fail(String.format("Format %s failed with %s", format,
+ e.getMessage()));
}
}
}
}
@@
-123,7
+131,7
@@
public class FormatAdapterTest
static Object[][] getFormats()
{
List<FileFormatI> both = new ArrayList<FileFormatI>();
static Object[][] getFormats()
{
List<FileFormatI> both = new ArrayList<FileFormatI>();
- for (FileFormat format : FileFormat.values())
+ for (FileFormatI format : FileFormats.getInstance().getFormats())
{
if (format.isReadable() && format.isWritable()
&& format.isTextFormat())
{
if (format.isReadable() && format.isWritable()
&& format.isTextFormat())