Skip to content

Commit

Permalink
change external test resource to file system file
Browse files Browse the repository at this point in the history
  • Loading branch information
akryvtsun committed Jun 16, 2017
1 parent 127cff1 commit b5fcb74
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/test/java/org/cactoos/io/LengthOfInputTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@ public void readsRealUrl() throws IOException {
new LengthOfInput(
new UrlAsInput(
// @checkstyle LineLength (1 line)
"https://raw.githubusercontent.com/yegor256/cactoos/0.5/pom.xml"
"file:src/test/resources/org/cactoos/large-text.txt"
)
).asValue(),
// @checkstyle MagicNumber (1 line)
Matchers.equalTo(5960L)
Matchers.equalTo(73471L)
);
}

Expand Down
4 changes: 2 additions & 2 deletions src/test/java/org/cactoos/io/StickyInputTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,13 @@ public void readsRealUrl() {
new StickyInput(
new UrlAsInput(
// @checkstyle LineLength (1 line)
"https://raw.githubusercontent.com/yegor256/cactoos/0.5/pom.xml"
"file:src/test/resources/org/cactoos/large-text.txt"
)
)
)
),
new TextHasString(
Matchers.endsWith("</project>\n")
Matchers.endsWith("est laborum.\n")
)
);
}
Expand Down
6 changes: 3 additions & 3 deletions src/test/java/org/cactoos/io/UrlAsInputTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -77,18 +77,18 @@ public void readsRealUrl() throws IOException {
}

@Test
public void readsHttpsUrl() {
public void readsStringUrl() {
MatcherAssert.assertThat(
"Can't fetch bytes from the HTTPS URL",
new BytesAsText(
new InputAsBytes(
new UrlAsInput(
// @checkstyle LineLength (1 line)
"https://raw.githubusercontent.com/yegor256/cactoos/0.5/pom.xml"
"file:src/test/resources/org/cactoos/large-text.txt"
)
)
),
new TextHasString(Matchers.containsString("<project"))
new TextHasString(Matchers.containsString("Lorem ipsum"))
);
}

Expand Down

0 comments on commit b5fcb74

Please sign in to comment.