You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: spring-data-mongodb/src/main/kotlin/org/springframework/data/mongodb/core/query/TypedCriteriaExtensions.kt
+5-5
Original file line number
Diff line number
Diff line change
@@ -391,7 +391,7 @@ infix fun KProperty<*>.bits(bitwiseCriteria: Criteria.BitwiseCriteriaOperators.(
Copy file name to clipboardExpand all lines: spring-data-mongodb/src/test/kotlin/org/springframework/data/mongodb/core/query/TypedCriteriaExtensionsTests.kt
+34-3
Original file line number
Diff line number
Diff line change
@@ -211,8 +211,8 @@ class TypedCriteriaExtensionsTests {
211
211
fun`not() should equal classic criteria`() {
212
212
213
213
// TODO: improve not() syntax
214
-
val typed =Book::title.not().isEqualTo("Moby-Dick")
215
-
val classic =Criteria("title").not().isEqualTo("Moby-Dick")
214
+
val typed =Book::price.not().lt(123)
215
+
val classic =Criteria("price").not().lt(123)
216
216
assertEqualCriteria(typed, classic)
217
217
}
218
218
@@ -413,14 +413,45 @@ class TypedCriteriaExtensionsTests {
413
413
}
414
414
415
415
@Test
416
-
fun`infix or should equal classic criteria`() {
416
+
fun`isEqualTo and orOperator should equal classic criteria`() {
417
417
418
418
val typed = (Book::title isEqualTo "Moby-Dick") and (Book::price lt 1200 orOperator (Book::price gt 240))
419
419
val classic =Criteria("title").isEqualTo("Moby-Dick")
0 commit comments