Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
import org.junit.Test;

import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.List;
Expand All @@ -16,9 +18,9 @@
public class FastaStreamerTest {

@Test
public void stream() throws IOException {
String file = this.getClass().getResource("PF00104_small.fasta.gz").getFile();
Path path = Paths.get(file);
public void stream() throws IOException, URISyntaxException {
URI fileUri = this.getClass().getResource("PF00104_small.fasta.gz").toURI();
Path path = Paths.get(fileUri);
List<ProteinSequence> sequences;

sequences = FastaStreamer.from(path).stream().collect(Collectors.toList());
Expand All @@ -38,9 +40,9 @@ public void stream() throws IOException {
}

@Test
public void iterate() {
String file = this.getClass().getResource("PF00104_small.fasta.gz").getFile();
Path path = Paths.get(file);
public void iterate() throws URISyntaxException {
URI fileUri = this.getClass().getResource("PF00104_small.fasta.gz").toURI();
Path path = Paths.get(fileUri);
int count = 0;
for (ProteinSequence sequence : FastaStreamer.from(path).each()) {
count++;
Expand Down