File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
biojava-core/src/test/java/org/biojava/nbio/core/sequence/io Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change 55import org .junit .Test ;
66
77import java .io .IOException ;
8+ import java .net .URI ;
9+ import java .net .URISyntaxException ;
810import java .nio .file .Path ;
911import java .nio .file .Paths ;
1012import java .util .List ;
1618public class FastaStreamerTest {
1719
1820 @ Test
19- public void stream () throws IOException {
20- String file = this .getClass ().getResource ("PF00104_small.fasta.gz" ).getFile ();
21- Path path = Paths .get (file );
21+ public void stream () throws IOException , URISyntaxException {
22+ URI fileUri = this .getClass ().getResource ("PF00104_small.fasta.gz" ).toURI ();
23+ Path path = Paths .get (fileUri );
2224 List <ProteinSequence > sequences ;
2325
2426 sequences = FastaStreamer .from (path ).stream ().collect (Collectors .toList ());
@@ -38,9 +40,9 @@ public void stream() throws IOException {
3840 }
3941
4042 @ Test
41- public void iterate () {
42- String file = this .getClass ().getResource ("PF00104_small.fasta.gz" ).getFile ();
43- Path path = Paths .get (file );
43+ public void iterate () throws URISyntaxException {
44+ URI fileUri = this .getClass ().getResource ("PF00104_small.fasta.gz" ).toURI ();
45+ Path path = Paths .get (fileUri );
4446 int count = 0 ;
4547 for (ProteinSequence sequence : FastaStreamer .from (path ).each ()) {
4648 count ++;
You can’t perform that action at this time.
0 commit comments