File tree Expand file tree Collapse file tree 1 file changed +1
-21
lines changed
src/test/java/org/juv25d/http Expand file tree Collapse file tree 1 file changed +1
-21
lines changed Original file line number Diff line number Diff line change 22
33import org .junit .jupiter .api .BeforeEach ;
44import org .junit .jupiter .api .Test ;
5+
56import static org .junit .jupiter .api .Assertions .*;
67
78public 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}
You can’t perform that action at this time.
0 commit comments