Skip to content

Commit

Permalink
MockClient: Cosmetics
Browse files Browse the repository at this point in the history
  • Loading branch information
Bogdan Langendorf committed Jun 19, 2014
1 parent 33ccf03 commit def7109
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/main/java/retromock/MockClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -153,12 +153,15 @@ public Response createFrom(Request request) throws IOException {
}

public static ResponseFactory fromFile(final Path path) {
return fromFile(path.toFile());
return new ResponseFactory() {
@Override
public Response createFrom(Request request) throws IOException {
return HttpParser.parse(request.getUrl(), path);
}
};
}

public abstract Response createFrom(Request request) throws IOException;
}



}

0 comments on commit def7109

Please sign in to comment.