Skip to content

Commit

Permalink
tests: fix outdated mocks
Browse files Browse the repository at this point in the history
  • Loading branch information
jssotomdz committed Feb 15, 2024
1 parent 3e4ce9e commit 5d6e897
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 0 deletions.
23 changes: 23 additions & 0 deletions packages/app_center/test/snapd_cache_test.mocks.dart
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,27 @@ class MockSnapdClient extends _i1.Mock implements _i2.SnapdClient {
)),
) as _i3.Future<String>);

@override
_i3.Future<String> installMany(
List<String>? names, {
bool? classic = false,
}) =>
(super.noSuchMethod(
Invocation.method(
#installMany,
[names],
{#classic: classic},
),
returnValue: _i3.Future<String>.value(_i4.dummyValue<String>(
this,
Invocation.method(
#installMany,
[names],
{#classic: classic},
),
)),
) as _i3.Future<String>);

@override
_i3.Future<String> connect(
String? snap,
Expand Down Expand Up @@ -317,6 +338,7 @@ class MockSnapdClient extends _i1.Mock implements _i2.SnapdClient {
String? category,
String? section,
_i2.SnapFindFilter? filter,
_i2.SnapFindScope? scope,
}) =>
(super.noSuchMethod(
Invocation.method(
Expand All @@ -328,6 +350,7 @@ class MockSnapdClient extends _i1.Mock implements _i2.SnapdClient {
#category: category,
#section: section,
#filter: filter,
#scope: scope,
},
),
returnValue: _i3.Future<List<_i2.Snap>>.value(<_i2.Snap>[]),
Expand Down
23 changes: 23 additions & 0 deletions packages/app_center/test/snapd_watcher_test.mocks.dart
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,27 @@ class MockSnapdClient extends _i1.Mock implements _i2.SnapdClient {
)),
) as _i3.Future<String>);

@override
_i3.Future<String> installMany(
List<String>? names, {
bool? classic = false,
}) =>
(super.noSuchMethod(
Invocation.method(
#installMany,
[names],
{#classic: classic},
),
returnValue: _i3.Future<String>.value(_i4.dummyValue<String>(
this,
Invocation.method(
#installMany,
[names],
{#classic: classic},
),
)),
) as _i3.Future<String>);

@override
_i3.Future<String> connect(
String? snap,
Expand Down Expand Up @@ -317,6 +338,7 @@ class MockSnapdClient extends _i1.Mock implements _i2.SnapdClient {
String? category,
String? section,
_i2.SnapFindFilter? filter,
_i2.SnapFindScope? scope,
}) =>
(super.noSuchMethod(
Invocation.method(
Expand All @@ -328,6 +350,7 @@ class MockSnapdClient extends _i1.Mock implements _i2.SnapdClient {
#category: category,
#section: section,
#filter: filter,
#scope: scope,
},
),
returnValue: _i3.Future<List<_i2.Snap>>.value(<_i2.Snap>[]),
Expand Down
23 changes: 23 additions & 0 deletions packages/app_center/test/test_utils.mocks.dart
Original file line number Diff line number Diff line change
Expand Up @@ -994,6 +994,27 @@ class MockSnapdService extends _i1.Mock implements _i6.SnapdService {
)),
) as _i14.Future<String>);

@override
_i14.Future<String> installMany(
List<String>? names, {
bool? classic = false,
}) =>
(super.noSuchMethod(
Invocation.method(
#installMany,
[names],
{#classic: classic},
),
returnValue: _i14.Future<String>.value(_i13.dummyValue<String>(
this,
Invocation.method(
#installMany,
[names],
{#classic: classic},
),
)),
) as _i14.Future<String>);

@override
_i14.Future<String> connect(
String? snap,
Expand Down Expand Up @@ -1063,6 +1084,7 @@ class MockSnapdService extends _i1.Mock implements _i6.SnapdService {
String? category,
String? section,
_i2.SnapFindFilter? filter,
_i2.SnapFindScope? scope,
}) =>
(super.noSuchMethod(
Invocation.method(
Expand All @@ -1074,6 +1096,7 @@ class MockSnapdService extends _i1.Mock implements _i6.SnapdService {
#category: category,
#section: section,
#filter: filter,
#scope: scope,
},
),
returnValue: _i14.Future<List<_i2.Snap>>.value(<_i2.Snap>[]),
Expand Down

0 comments on commit 5d6e897

Please sign in to comment.