Skip to content

Commit

Permalink
yegor256#968 corrected the conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasmessias9898 committed Mar 28, 2019
2 parents a2de7dd + 492653b commit e9a7d4f
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 19 deletions.
7 changes: 4 additions & 3 deletions src/test/java/org/takes/rq/RqOnceTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
*/
package org.takes.rq;

import com.google.common.base.Joiner;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import org.cactoos.text.JoinedText;
import org.junit.Test;
import org.takes.Request;

Expand All @@ -44,12 +44,13 @@ public void makesRequestReadOnlyOnce() throws IOException {
final Request req = new RqOnce(
new RqLive(
new ByteArrayInputStream(
Joiner.on("\r\n").join(
new JoinedText(
"\r\n",
"GET /test HTTP/1.1",
"Host: localhost",
"",
"... the body ..."
).getBytes()
).asString().getBytes()
)
)
);
Expand Down
12 changes: 7 additions & 5 deletions src/test/java/org/takes/rq/RqWithDefaultHeaderTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
*/
package org.takes.rq;

import com.google.common.base.Joiner;
import java.io.IOException;
import java.util.Collections;
import org.cactoos.text.JoinedText;
import org.hamcrest.MatcherAssert;
import org.hamcrest.Matchers;
import org.junit.Test;
Expand Down Expand Up @@ -57,10 +57,11 @@ public void providesDefaultHeader() throws IOException {
)
).print(),
Matchers.startsWith(
Joiner.on(RqWithDefaultHeaderTest.CRLF).join(
new JoinedText(
RqWithDefaultHeaderTest.CRLF,
req,
"X-Default-Header1: X-Default-Value"
)
).asString()
)
);
}
Expand All @@ -86,10 +87,11 @@ public void allowsOverrideDefaultHeader() throws IOException {
)
).print(),
Matchers.startsWith(
Joiner.on(RqWithDefaultHeaderTest.CRLF).join(
new JoinedText(
RqWithDefaultHeaderTest.CRLF,
req,
"X-Default-Header2: Non-Default-Value"
)
).asString()
)
);
}
Expand Down
9 changes: 5 additions & 4 deletions src/test/java/org/takes/rs/RsWithHeaderTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
*/
package org.takes.rs;

import com.google.common.base.Joiner;
import java.io.IOException;
import org.cactoos.text.JoinedText;
import org.hamcrest.MatcherAssert;
import org.hamcrest.Matchers;
import org.junit.Test;
Expand All @@ -49,13 +49,14 @@ public void addsHeadersToResponse() throws IOException {
)
).print(),
Matchers.equalTo(
Joiner.on("\r\n").join(
"HTTP/1.1 204 No Content",
new JoinedText(
"\r\n",
"HTTP/1.1 200 OK",
"host: b.example.com",
"Host: a.example.com",
"",
""
)
).asString()
)
);
}
Expand Down
9 changes: 5 additions & 4 deletions src/test/java/org/takes/rs/RsWithHeadersTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
*/
package org.takes.rs;

import com.google.common.base.Joiner;
import java.io.IOException;
import org.cactoos.text.JoinedText;
import org.hamcrest.MatcherAssert;
import org.hamcrest.Matchers;
import org.junit.Test;
Expand Down Expand Up @@ -52,13 +52,14 @@ public void addsHeadersToResponse() throws IOException {
)
).print(),
Matchers.equalTo(
Joiner.on("\r\n").join(
"HTTP/1.1 204 No Content",
new JoinedText(
"\r\n",
"HTTP/1.1 200 OK",
host,
type,
"",
""
)
).asString()
)
);
}
Expand Down
7 changes: 4 additions & 3 deletions src/test/java/org/takes/rs/RsWithStatusTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
*/
package org.takes.rs;

import com.google.common.base.Joiner;
import java.io.IOException;
import java.net.HttpURLConnection;
import org.cactoos.text.JoinedText;
import org.hamcrest.MatcherAssert;
import org.hamcrest.Matchers;
import org.junit.Test;
Expand All @@ -52,12 +52,13 @@ public void addsStatus() throws IOException {
)
).print(),
Matchers.equalTo(
Joiner.on("\r\n").join(
new JoinedText(
"\r\n",
"HTTP/1.1 404 Not Found",
"Host: example.com",
"",
""
)
).asString()
)
);
}
Expand Down

0 comments on commit e9a7d4f

Please sign in to comment.