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
Merge branch 'bug/JAL-2507_rnasecstrstockholm' into develop
[jalview.git]
/
test
/
jalview
/
io
/
PhylipFileTests.java
diff --git
a/test/jalview/io/PhylipFileTests.java
b/test/jalview/io/PhylipFileTests.java
index
8c58382
..
d853350
100644
(file)
--- a/
test/jalview/io/PhylipFileTests.java
+++ b/
test/jalview/io/PhylipFileTests.java
@@
-1,6
+1,6
@@
/*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9.0b1)
- * Copyright (C) 2015 The Jalview Authors
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors
*
* This file is part of Jalview.
*
*
* This file is part of Jalview.
*
@@
-25,11
+25,13
@@
import static org.testng.AssertJUnit.assertTrue;
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.HashMap;
import java.util.Map;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
+import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
/**
import org.testng.annotations.Test;
/**
@@
-45,6
+47,13
@@
import org.testng.annotations.Test;
public class PhylipFileTests
{
public class PhylipFileTests
{
+ @BeforeClass(alwaysRun = true)
+ public void setUpJvOptionPane()
+ {
+ JvOptionPane.setInteractiveMode(false);
+ JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION);
+ }
+
// interleaved file from
// http://www.molecularevolution.org/molevolfiles/fileformats/dna.phy.dat
// sequential file is the interleave file converted into sequential format
// interleaved file from
// http://www.molecularevolution.org/molevolfiles/fileformats/dna.phy.dat
// sequential file is the interleave file converted into sequential format
@@
-126,8
+135,8
@@
public class PhylipFileTests
private void testDataExtraction(String file) throws IOException
{
AppletFormatAdapter rf = new AppletFormatAdapter();
private void testDataExtraction(String file) throws IOException
{
AppletFormatAdapter rf = new AppletFormatAdapter();
- AlignmentI al = rf.readFile(file, AppletFormatAdapter.FILE,
- PhylipFile.FILE_DESC);
+ AlignmentI al = rf.readFile(file, DataSourceType.FILE,
+ FileFormat.Phylip);
assertNotNull("Couldn't read supplied alignment data.", al);
Map<String, String> data = PhylipFileTests.getTestData();
assertNotNull("Couldn't read supplied alignment data.", al);
Map<String, String> data = PhylipFileTests.getTestData();
@@
-171,17
+180,18
@@
public class PhylipFileTests
public void testIO(String file) throws IOException
{
AppletFormatAdapter rf = new AppletFormatAdapter();
public void testIO(String file) throws IOException
{
AppletFormatAdapter rf = new AppletFormatAdapter();
- AlignmentI al = rf.readFile(file, AppletFormatAdapter.FILE,
- PhylipFile.FILE_DESC);
+ AlignmentI al = rf.readFile(file, DataSourceType.FILE,
+ FileFormat.Phylip);
assertNotNull("Couldn't read supplied alignment data.", al);
assertNotNull("Couldn't read supplied alignment data.", al);
- String outputfile = rf.formatSequences(PhylipFile.FILE_DESC, al, true);
+ String outputfile = rf.formatSequences(FileFormat.Phylip, al, true);
AlignmentI al_input = new AppletFormatAdapter().readFile(outputfile,
AlignmentI al_input = new AppletFormatAdapter().readFile(outputfile,
- AppletFormatAdapter.PASTE, PhylipFile.FILE_DESC);
+ DataSourceType.PASTE, FileFormat.Phylip);
assertNotNull("Couldn't parse reimported alignment data.", al_input);
assertNotNull("Couldn't parse reimported alignment data.", al_input);
- StockholmFileTest.testAlignmentEquivalence(al, al_input, false);
+ StockholmFileTest.testAlignmentEquivalence(al, al_input, false, false,
+ false);
}
}
}
}