Skip to content

Commit

Permalink
change echo
Browse files Browse the repository at this point in the history
  • Loading branch information
Diana01010101 committed Mar 23, 2024
1 parent 57a9eb6 commit a670285
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 2 deletions.
9 changes: 7 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,20 @@ plugins {
group = 'ru.netology'
version = '1.0-SNAPSHOT'

sourceCompatibility = 11
compileJava.options.encoding = "UTF-8"
compileTestJava.options.encoding = "UTF-8"

repositories {
mavenCentral()
}

dependencies {
testImplementation platform('org.junit:junit-bom:5.9.1')
testImplementation 'org.junit.jupiter:junit-jupiter'
testImplementation 'io.rest-assured:rest-assured:5.3.1'
testImplementation 'org.junit.jupiter:junit-jupiter:5.7.0'
}


test {
useJUnitPlatform()
}
23 changes: 23 additions & 0 deletions src/test/java/PostmanEchoTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import org.junit.jupiter.api.Test;

import static io.restassured.RestAssured.given;
import static org.hamcrest.Matchers.equalTo;

class PostmanEchoTest {

@Test
void shouldReturnSendData() {
var text = "Hi";
given()
.baseUri("https://postman-echo.com")
.body(text)
.when()
.post("/post")
.then()
.statusCode(200)
.body("data", equalTo(text))
;
}


}

0 comments on commit a670285

Please sign in to comment.