@@ -59,7 +59,7 @@ void main() {
59
59
.thenAnswer ((_) async => [hash]);
60
60
// No DB entries for this asset
61
61
when (
62
- () => mockDeviceAssetRepository.getForIds ([AssetStub .image1.localId! ]),
62
+ () => mockDeviceAssetRepository.getByIds ([AssetStub .image1.localId! ]),
63
63
).thenAnswer ((_) async => []);
64
64
65
65
final result = await sut.hashAssets ([mockAsset]);
@@ -92,7 +92,7 @@ void main() {
92
92
final hash = utf8.encode ("image1-hash" );
93
93
94
94
when (
95
- () => mockDeviceAssetRepository.getForIds ([AssetStub .image1.localId! ]),
95
+ () => mockDeviceAssetRepository.getByIds ([AssetStub .image1.localId! ]),
96
96
).thenAnswer (
97
97
(_) async => [
98
98
DeviceAsset (
@@ -121,7 +121,7 @@ void main() {
121
121
when (() => mockBackgroundService.digestFiles ([file.path]))
122
122
.thenAnswer ((_) async => [hash]);
123
123
when (
124
- () => mockDeviceAssetRepository.getForIds ([AssetStub .image1.localId! ]),
124
+ () => mockDeviceAssetRepository.getByIds ([AssetStub .image1.localId! ]),
125
125
).thenAnswer ((_) async => [deviceAsset]);
126
126
127
127
final result = await sut.hashAssets ([mockAsset]);
@@ -163,7 +163,7 @@ void main() {
163
163
when (() => mockBackgroundService.digestFiles ([file.path]))
164
164
.thenAnswer ((_) async => [hash]);
165
165
when (
166
- () => mockDeviceAssetRepository.getForIds ([AssetStub .image1.localId! ]),
166
+ () => mockDeviceAssetRepository.getByIds ([AssetStub .image1.localId! ]),
167
167
).thenAnswer ((_) async => [deviceAsset]);
168
168
});
169
169
@@ -240,7 +240,7 @@ void main() {
240
240
final (asset2, file2, deviceAsset2, hash2) = mock2;
241
241
final (asset3, file3, deviceAsset3, hash3) = mock3;
242
242
243
- when (() => mockDeviceAssetRepository.getForIds (any ()))
243
+ when (() => mockDeviceAssetRepository.getByIds (any ()))
244
244
.thenAnswer ((_) async => []);
245
245
246
246
// Setup for multiple batch processing calls
@@ -285,7 +285,7 @@ void main() {
285
285
final (asset2, file2, deviceAsset2, hash2) = mock2;
286
286
final (asset3, file3, deviceAsset3, hash3) = mock3;
287
287
288
- when (() => mockDeviceAssetRepository.getForIds (any ()))
288
+ when (() => mockDeviceAssetRepository.getByIds (any ()))
289
289
.thenAnswer ((_) async => []);
290
290
291
291
when (() => mockBackgroundService.digestFiles ([file1.path]))
@@ -331,7 +331,7 @@ void main() {
331
331
.thenAnswer ((_) async => [hash1, hash3]);
332
332
// DB entries are not sorted and a dummy entry added
333
333
when (
334
- () => mockDeviceAssetRepository.getForIds ([
334
+ () => mockDeviceAssetRepository.getByIds ([
335
335
AssetStub .image1.localId! ,
336
336
AssetStub .image2.localId! ,
337
337
AssetStub .image3.localId! ,
@@ -361,7 +361,7 @@ void main() {
361
361
362
362
group ("HashService: Edge cases" , () {
363
363
test ("handles empty list of assets" , () async {
364
- when (() => mockDeviceAssetRepository.getForIds (any ()))
364
+ when (() => mockDeviceAssetRepository.getByIds (any ()))
365
365
.thenAnswer ((_) async => []);
366
366
367
367
final result = await sut.hashAssets ([]);
@@ -376,7 +376,7 @@ void main() {
376
376
test ("handles all file access failures" , () async {
377
377
// No DB entries
378
378
when (
379
- () => mockDeviceAssetRepository.getForIds (
379
+ () => mockDeviceAssetRepository.getByIds (
380
380
[AssetStub .image1.localId! , AssetStub .image2.localId! ],
381
381
),
382
382
).thenAnswer ((_) async => []);
0 commit comments