From b5fcb748d8b9419538d33bec373b97eb9adbe2ac Mon Sep 17 00:00:00 2001 From: englishman Date: Fri, 16 Jun 2017 13:09:25 -0400 Subject: [PATCH] change external test resource to file system file --- src/test/java/org/cactoos/io/LengthOfInputTest.java | 4 ++-- src/test/java/org/cactoos/io/StickyInputTest.java | 4 ++-- src/test/java/org/cactoos/io/UrlAsInputTest.java | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/test/java/org/cactoos/io/LengthOfInputTest.java b/src/test/java/org/cactoos/io/LengthOfInputTest.java index 21e4df09f3..ace424e8c6 100644 --- a/src/test/java/org/cactoos/io/LengthOfInputTest.java +++ b/src/test/java/org/cactoos/io/LengthOfInputTest.java @@ -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) ); } diff --git a/src/test/java/org/cactoos/io/StickyInputTest.java b/src/test/java/org/cactoos/io/StickyInputTest.java index 29db28038c..ead842d12b 100644 --- a/src/test/java/org/cactoos/io/StickyInputTest.java +++ b/src/test/java/org/cactoos/io/StickyInputTest.java @@ -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("\n") + Matchers.endsWith("est laborum.\n") ) ); } diff --git a/src/test/java/org/cactoos/io/UrlAsInputTest.java b/src/test/java/org/cactoos/io/UrlAsInputTest.java index a4157084be..dc5583708f 100644 --- a/src/test/java/org/cactoos/io/UrlAsInputTest.java +++ b/src/test/java/org/cactoos/io/UrlAsInputTest.java @@ -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("