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
19 lines
513 B
import org.junit.jupiter.api.Test;
|
|
|
|
import java.io.IOException;
|
|
import java.util.Objects;
|
|
|
|
import static org.junit.jupiter.api.Assertions.*;
|
|
|
|
class HttpApiTest {
|
|
|
|
@Test
|
|
void sendHttpGETRequest() {
|
|
assertDoesNotThrow(() -> HttpApi.sendHttpGETRequest("https://httpbin.org/get"));
|
|
try {
|
|
assertTrue(Objects.requireNonNull(HttpApi.sendHttpGETRequest("https://httpbin.org/get")).contains("args"));
|
|
} catch (IOException e) {
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
}
|