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.

Backported to 2.6.x.

See #2418.
This commit is contained in:
Greg L. Turnquist
2022-01-25 10:32:20 -06:00
parent 59fd61aad8
commit 47f36f6ba2

View File

@@ -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
}