|
|
|
|
@ -1,5 +1,5 @@
@@ -1,5 +1,5 @@
|
|
|
|
|
/* |
|
|
|
|
* Copyright 2002-2022 the original author or authors. |
|
|
|
|
* Copyright 2002-2024 the original author or authors. |
|
|
|
|
* |
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
|
* you may not use this file except in compliance with the License. |
|
|
|
|
@ -110,7 +110,7 @@ class ExceptionHandlerTests {
@@ -110,7 +110,7 @@ class ExceptionHandlerTests {
|
|
|
|
|
.accept(MediaType.APPLICATION_JSON) |
|
|
|
|
.exchange() |
|
|
|
|
.expectStatus().isOk() |
|
|
|
|
.expectBody().jsonPath("$.name", "Yoda"); |
|
|
|
|
.expectBody().jsonPath("$.name").isEqualTo("Yoda"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
@ -123,7 +123,7 @@ class ExceptionHandlerTests {
@@ -123,7 +123,7 @@ class ExceptionHandlerTests {
|
|
|
|
|
.accept(MediaType.APPLICATION_JSON) |
|
|
|
|
.exchange() |
|
|
|
|
.expectStatus().isOk() |
|
|
|
|
.expectBody().jsonPath("$.error", "local - IllegalArgumentException"); |
|
|
|
|
.expectBody().jsonPath("$.error").isEqualTo("local - IllegalArgumentException"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
@ -136,7 +136,7 @@ class ExceptionHandlerTests {
@@ -136,7 +136,7 @@ class ExceptionHandlerTests {
|
|
|
|
|
.accept(MediaType.APPLICATION_JSON) |
|
|
|
|
.exchange() |
|
|
|
|
.expectStatus().isOk() |
|
|
|
|
.expectBody().jsonPath("$.error", "global - IllegalArgumentException"); |
|
|
|
|
.expectBody().jsonPath("$.error").isEqualTo("global - IllegalStateException"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
@ -149,7 +149,7 @@ class ExceptionHandlerTests {
@@ -149,7 +149,7 @@ class ExceptionHandlerTests {
|
|
|
|
|
.accept(MediaType.APPLICATION_JSON) |
|
|
|
|
.exchange() |
|
|
|
|
.expectStatus().isOk() |
|
|
|
|
.expectBody().jsonPath("$.error", "globalPersonController - IllegalStateException"); |
|
|
|
|
.expectBody().jsonPath("$.error").isEqualTo("globalPersonController - IllegalStateException"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
@ -163,7 +163,7 @@ class ExceptionHandlerTests {
@@ -163,7 +163,7 @@ class ExceptionHandlerTests {
|
|
|
|
|
.accept(MediaType.APPLICATION_JSON) |
|
|
|
|
.exchange() |
|
|
|
|
.expectStatus().isOk() |
|
|
|
|
.expectBody().jsonPath("$.error", "global - NoHandlerFoundException"); |
|
|
|
|
.expectBody().jsonPath("$.error").isEqualTo("global - NoHandlerFoundException"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|