You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
513 B

  1. import org.junit.jupiter.api.Test;
  2. import java.io.IOException;
  3. import java.util.Objects;
  4. import static org.junit.jupiter.api.Assertions.*;
  5. class HttpApiTest {
  6. @Test
  7. void sendHttpGETRequest() {
  8. assertDoesNotThrow(() -> HttpApi.sendHttpGETRequest("https://httpbin.org/get"));
  9. try {
  10. assertTrue(Objects.requireNonNull(HttpApi.sendHttpGETRequest("https://httpbin.org/get")).contains("args"));
  11. } catch (IOException e) {
  12. e.printStackTrace();
  13. }
  14. }
  15. }