Created
June 26, 2020 22:27
-
-
Save uLucasFraga/624137fb623d0ddea8794e6066bec00f to your computer and use it in GitHub Desktop.
Exemplo de teste para Contrato
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.apache.http.HttpStatus; | |
import org.junit.Test; | |
import static io.restassured.RestAssured.when; | |
import static io.restassured.module.jsv.JsonSchemaValidator.matchesJsonSchemaInClasspath; | |
public class ExemploContrato { | |
@Test | |
public void exemploContratoValidar() { | |
when() | |
.get("SUA_URI_AQUI") | |
.then().statusCode(HttpStatus.SC_OK) | |
.body(matchesJsonSchemaInClasspath("exemplo-schema.json")); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment