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: packages/mongodb-dialects/java-driver/src/main/kotlin/com/mongodb/jbplugin/dialects/javadriver/glossary/JavaDriverDialectParser.kt
Copy file name to clipboardExpand all lines: packages/mongodb-dialects/spring-criteria/src/main/kotlin/com/mongodb/jbplugin/dialects/springcriteria/SpringCriteriaDialectParser.kt
Copy file name to clipboardExpand all lines: packages/mongodb-dialects/spring-criteria/src/test/kotlin/com/mongodb/jbplugin/dialects/springcriteria/IntegrationTest.kt
+10-4Lines changed: 10 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -349,13 +349,15 @@ inline fun <reified T : HasCollectionReference.CollectionReference<PsiElement>>
349
349
assertions:T.() ->Unit
350
350
) {
351
351
val ref = component<HasCollectionReference<PsiElement>>()
352
-
assertNotNull(ref)
352
+
assertNotEquals(null, ref) {
353
+
"Could not find a HasCollectionReference component in the query."
354
+
}
353
355
354
356
if (ref!!.reference isT) {
355
357
(ref.reference asT).assertions()
356
358
} else {
357
359
fail(
358
-
"Collection reference was not of type ${T::class.java.canonicalName} but ${ref::class.java.canonicalName}"
360
+
"Collection reference was not of type ${T::class.java.canonicalName} but ${ref.reference.javaClass.canonicalName}"
359
361
)
360
362
}
361
363
}
@@ -364,7 +366,9 @@ inline fun <reified T : HasFieldReference.FieldReference<PsiElement>> Node<PsiEl
364
366
assertions:T.() ->Unit
365
367
) {
366
368
val ref = component<HasFieldReference<PsiElement>>()
367
-
assertNotNull(ref)
369
+
assertNotEquals(null, ref) {
370
+
"Could not find a HasFieldReference component in the query."
371
+
}
368
372
369
373
if (ref!!.reference isT) {
370
374
(ref.reference asT).assertions()
@@ -379,7 +383,9 @@ inline fun <reified T : HasValueReference.ValueReference<PsiElement>> Node<PsiEl
379
383
assertions:T.() ->Unit
380
384
) {
381
385
val ref = component<HasValueReference<PsiElement>>()
382
-
assertNotNull(ref)
386
+
assertNotEquals(null, ref) {
387
+
"Could not find a HasValueReference component in the query."
0 commit comments