Skip to content

Commit 04addf4

Browse files
committed
Fix HttpResponseTest
1 parent 052d32c commit 04addf4

File tree

1 file changed

+1
-21
lines changed

1 file changed

+1
-21
lines changed

src/test/java/org/juv25d/http/HttpResponseTest.java

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import org.junit.jupiter.api.BeforeEach;
44
import org.junit.jupiter.api.Test;
5+
56
import static org.junit.jupiter.api.Assertions.*;
67

78
public class HttpResponseTest {
@@ -36,26 +37,5 @@ void shouldHaveEmptyHeaderByDefault() {
3637
@Test
3738
void shouldHaveEmptyBodyByDefault() {
3839
assertArrayEquals(new byte[0], response.body());
39-
import org.junit.jupiter.api.Test;
40-
41-
import static org.assertj.core.api.Assertions.assertThat;
42-
import static org.assertj.core.api.Assertions.assertThatCode;
43-
44-
class HttpResponseTest {
45-
46-
@Test
47-
void defaultConstructor_hasSafeDefaults_andSetHeaderDoesNotThrow() {
48-
HttpResponse response = new HttpResponse();
49-
50-
assertThat(response.statusCode()).isEqualTo(200);
51-
assertThat(response.statusText()).isEqualTo("OK");
52-
assertThat(response.headers()).isNotNull();
53-
assertThat(response.body()).isNotNull();
54-
assertThat(response.body()).isEmpty();
55-
56-
assertThatCode(() -> response.setHeader("Content-Type", "text/plain"))
57-
.doesNotThrowAnyException();
58-
59-
assertThat(response.headers()).containsEntry("Content-Type", "text/plain");
6040
}
6141
}

0 commit comments

Comments
 (0)