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.
This commit is contained in:
Greg L. Turnquist
2022-01-25 10:32:20 -06:00
parent 192bec37ee
commit 32ffebf46b

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
}