From 32ffebf46b0a683893d84164dd03cb11fa739302 Mon Sep 17 00:00:00 2001 From: "Greg L. Turnquist" Date: Tue, 25 Jan 2022 10:32:20 -0600 Subject: [PATCH] Fix 'noSuchProperty' test case. The error message for nonexistent properties inside query derivation now wraps the named property with single quotes. This breaks a test case that was looking for spaces before and after. Closes #2418. --- .../jpa/repository/query/PartTreeJpaQueryIntegrationTests.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/org/springframework/data/jpa/repository/query/PartTreeJpaQueryIntegrationTests.java b/src/test/java/org/springframework/data/jpa/repository/query/PartTreeJpaQueryIntegrationTests.java index 69afb6a59..d35d09be5 100644 --- a/src/test/java/org/springframework/data/jpa/repository/query/PartTreeJpaQueryIntegrationTests.java +++ b/src/test/java/org/springframework/data/jpa/repository/query/PartTreeJpaQueryIntegrationTests.java @@ -222,7 +222,7 @@ public class PartTreeJpaQueryIntegrationTests { assertThatExceptionOfType(IllegalArgumentException.class) // .isThrownBy(() -> new PartTreeJpaQuery(method, entityManager)) // .withMessageContaining("findByNoSuchProperty") // the method being analyzed - .withMessageContaining(" noSuchProperty ") // the property we are looking for + .withMessageContaining("'noSuchProperty'") // the property we are looking for .withMessageContaining("UserRepository"); // the repository }