fixed formatting and updated readme.md
This commit is contained in:
@@ -127,13 +127,15 @@ public class PetStoreTests {
|
||||
@Order(5)
|
||||
@DisplayName("5. Test: Create pet with invalid JSON")
|
||||
public void testCreatePetInvalidJson() {
|
||||
String invalidJson = "{\n" +
|
||||
" \"id\": 123456,\n" +
|
||||
" \"name\": \"Invalid Pet\",\n" +
|
||||
" \"category\": { \"id\": 1, \"name\": \"Dogs\" },\n" +
|
||||
" \"photoUrls\": [ \"http://example.com/photo.jpg\" ],\n" +
|
||||
" \"tags\": [ { \"id\": 0, \"name\": \"string\" } ],\n" +
|
||||
" \"status\": \"available\"\n"; // отсутствует закрывающая фигурная скобка
|
||||
String invalidJson = """
|
||||
{
|
||||
"id": 123456,
|
||||
"name": "Invalid Pet",
|
||||
"category": { "id": 1, "name": "Dogs" },
|
||||
"photoUrls": [ "http://example.com/photo.jpg" ],
|
||||
"tags": [ { "id": 0, "name": "string" } ],
|
||||
"status": "available"
|
||||
"""; // отсутствует закрывающая фигурная скобка
|
||||
given()
|
||||
.contentType(ContentType.JSON)
|
||||
.body(invalidJson)
|
||||
|
||||
Reference in New Issue
Block a user