From f2cb7e18417bf1cd4a06a31d3591aac12a5daf5b Mon Sep 17 00:00:00 2001 From: Diana test Date: Sat, 23 Mar 2024 18:03:36 +0300 Subject: [PATCH] change echo --- build.gradle | 1 + src/test/java/{ => ru/netology/echo}/PostmanEchoTest.java | 6 +++--- src/test/resources/postmanecho.schema.json | 0 3 files changed, 4 insertions(+), 3 deletions(-) rename src/test/java/{ => ru/netology/echo}/PostmanEchoTest.java (75%) create mode 100644 src/test/resources/postmanecho.schema.json diff --git a/build.gradle b/build.gradle index 3bb60e5..ba27e81 100644 --- a/build.gradle +++ b/build.gradle @@ -19,6 +19,7 @@ dependencies { } + test { useJUnitPlatform() } \ No newline at end of file diff --git a/src/test/java/PostmanEchoTest.java b/src/test/java/ru/netology/echo/PostmanEchoTest.java similarity index 75% rename from src/test/java/PostmanEchoTest.java rename to src/test/java/ru/netology/echo/PostmanEchoTest.java index 0ccd8aa..1ac510e 100644 --- a/src/test/java/PostmanEchoTest.java +++ b/src/test/java/ru/netology/echo/PostmanEchoTest.java @@ -1,4 +1,4 @@ -import io.restassured.response.ValidatableResponse; +package ru.netology.echo; import org.junit.jupiter.api.Test; import static io.restassured.RestAssured.given; @@ -11,12 +11,12 @@ void shouldReturnSendData() { var text = "Hi"; given() .baseUri("https://postman-echo.com") - .body("some data") + .body("Hi") .when() .post("/post") .then() .statusCode(200) - .body("data", equalTo(text)); + .body("data", equalTo("Hi")); } diff --git a/src/test/resources/postmanecho.schema.json b/src/test/resources/postmanecho.schema.json new file mode 100644 index 0000000..e69de29