@@ -16,6 +16,7 @@ import androidx.sqlite.db.SupportSQLiteStatement
16
16
import org.cryptomator.data.db.sqlmapping.Mapping.COMMENT
17
17
import org.cryptomator.data.db.sqlmapping.Mapping.COUNTER
18
18
import org.cryptomator.data.db.sqlmapping.Mapping.IDENTITY
19
+ import org.cryptomator.data.db.sqlmapping.MappingSupportSQLiteDatabase.MappingSupportSQLiteQuery
19
20
import org.cryptomator.data.db.sqlmapping.MappingSupportSQLiteDatabase.MappingSupportSQLiteStatement
20
21
import org.cryptomator.data.testing.ValueExtractor
21
22
import org.cryptomator.data.testing.anyPseudoEquals
@@ -51,6 +52,7 @@ import org.mockito.Mockito.verifyNoMoreInteractions
51
52
import org.mockito.internal.verification.VerificationModeFactory.times
52
53
import org.mockito.invocation.InvocationOnMock
53
54
import org.mockito.kotlin.KInOrder
55
+ import org.mockito.kotlin.and
54
56
import org.mockito.kotlin.anyArray
55
57
import org.mockito.kotlin.eq
56
58
import org.mockito.kotlin.inOrder
@@ -140,10 +142,16 @@ class MappingSupportSQLiteDatabaseTest {
140
142
141
143
val supportSQLiteQueryProperties = newCachedSupportSQLiteQueryProperties()
142
144
verify(delegateMock).query( //
143
- anyPseudoEquals(SimpleSQLiteQuery (" SELECT `col` FROM `id_test`" ), supportSQLiteQueryProperties)
145
+ and ( //
146
+ reifiedAny<MappingSupportSQLiteQuery >(), //
147
+ anyPseudoEquals(SimpleSQLiteQuery (" SELECT `col` FROM `id_test`" ), supportSQLiteQueryProperties) //
148
+ )
144
149
)
145
150
verify(delegateMock).query( //
146
- anyPseudoEquals(SimpleSQLiteQuery (" SELECT `col` FROM `comment_test` -- Comment!" ), supportSQLiteQueryProperties)
151
+ and ( //
152
+ reifiedAny<MappingSupportSQLiteQuery >(), //
153
+ anyPseudoEquals(SimpleSQLiteQuery (" SELECT `col` FROM `comment_test` -- Comment!" ), supportSQLiteQueryProperties) //
154
+ )
147
155
)
148
156
verifyNoMoreInteractions(delegateMock)
149
157
}
@@ -157,10 +165,16 @@ class MappingSupportSQLiteDatabaseTest {
157
165
158
166
val supportSQLiteQueryProperties = newCachedSupportSQLiteQueryProperties()
159
167
verify(delegateMock).query( //
160
- anyPseudoEquals(SimpleSQLiteQuery (" SELECT `col` FROM `id_test` WHERE `col` = ?" , arrayOf(" test1" )), supportSQLiteQueryProperties)
168
+ and ( //
169
+ reifiedAny<MappingSupportSQLiteQuery >(), //
170
+ anyPseudoEquals(SimpleSQLiteQuery (" SELECT `col` FROM `id_test` WHERE `col` = ?" , arrayOf(" test1" )), supportSQLiteQueryProperties) //
171
+ )
161
172
)
162
173
verify(delegateMock).query( //
163
- anyPseudoEquals(SimpleSQLiteQuery (" SELECT `col` FROM `comment_test` WHERE `col` = ? -- Comment!" , arrayOf(" test2" )), supportSQLiteQueryProperties)
174
+ and ( //
175
+ reifiedAny<MappingSupportSQLiteQuery >(), //
176
+ anyPseudoEquals(SimpleSQLiteQuery (" SELECT `col` FROM `comment_test` WHERE `col` = ? -- Comment!" , arrayOf(" test2" )), supportSQLiteQueryProperties) //
177
+ )
164
178
)
165
179
verifyNoMoreInteractions(delegateMock)
166
180
}
@@ -175,11 +189,17 @@ class MappingSupportSQLiteDatabaseTest {
175
189
176
190
val supportSQLiteQueryProperties = newCachedSupportSQLiteQueryProperties()
177
191
verify(delegateMock).query( //
178
- anyPseudoEquals(queries.idExpected, supportSQLiteQueryProperties), //
192
+ and (
193
+ reifiedAny<MappingSupportSQLiteQuery >(), //
194
+ anyPseudoEquals(queries.idExpected, supportSQLiteQueryProperties), //
195
+ ), //
179
196
anyPseudoEqualsUnlessNull(signals.idExpected, setOf<ValueExtractor <CancellationSignal >>(CancellationSignal ::isCanceled))
180
197
)
181
198
verify(delegateMock).query( //
182
- anyPseudoEquals(queries.commentExpected, supportSQLiteQueryProperties), //
199
+ and (
200
+ reifiedAny<MappingSupportSQLiteQuery >(), //
201
+ anyPseudoEquals(queries.commentExpected, supportSQLiteQueryProperties), //
202
+ ), //
183
203
anyPseudoEqualsUnlessNull(signals.commentExpected, setOf<ValueExtractor <CancellationSignal >>(CancellationSignal ::isCanceled))
184
204
)
185
205
verifyNoMoreInteractions(delegateMock)
0 commit comments