mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-22 11:29:23 +00:00
fix price test and update mocks
This commit is contained in:
parent
4b518243c6
commit
6214688768
19 changed files with 4335 additions and 4166 deletions
|
@ -33,8 +33,7 @@ class PriceAPI {
|
||||||
static const Duration refreshIntervalDuration =
|
static const Duration refreshIntervalDuration =
|
||||||
Duration(seconds: refreshInterval);
|
Duration(seconds: refreshInterval);
|
||||||
|
|
||||||
// final Client client;
|
final HTTP client;
|
||||||
HTTP client = HTTP();
|
|
||||||
|
|
||||||
PriceAPI(this.client);
|
PriceAPI(this.client);
|
||||||
|
|
||||||
|
|
|
@ -582,14 +582,14 @@ class MockPrefs extends _i1.Mock implements _i5.Prefs {
|
||||||
returnValueForMissingStub: null,
|
returnValueForMissingStub: null,
|
||||||
);
|
);
|
||||||
@override
|
@override
|
||||||
bool get torKillswitch => (super.noSuchMethod(
|
bool get torKillSwitch => (super.noSuchMethod(
|
||||||
Invocation.getter(#torKillswitch),
|
Invocation.getter(#torKillSwitch),
|
||||||
returnValue: false,
|
returnValue: false,
|
||||||
) as bool);
|
) as bool);
|
||||||
@override
|
@override
|
||||||
set torKillswitch(bool? torKillswitch) => super.noSuchMethod(
|
set torKillSwitch(bool? torKillswitch) => super.noSuchMethod(
|
||||||
Invocation.setter(
|
Invocation.setter(
|
||||||
#torKillswitch,
|
#torKillSwitch,
|
||||||
torKillswitch,
|
torKillswitch,
|
||||||
),
|
),
|
||||||
returnValueForMissingStub: null,
|
returnValueForMissingStub: null,
|
||||||
|
|
|
@ -1524,7 +1524,7 @@ void main() {
|
||||||
|
|
||||||
final mockPrefs = MockPrefs();
|
final mockPrefs = MockPrefs();
|
||||||
when(mockPrefs.useTor).thenAnswer((_) => false);
|
when(mockPrefs.useTor).thenAnswer((_) => false);
|
||||||
when(mockPrefs.torKillswitch)
|
when(mockPrefs.torKillSwitch)
|
||||||
.thenAnswer((_) => false); // Or true, shouldn't matter.
|
.thenAnswer((_) => false); // Or true, shouldn't matter.
|
||||||
when(mockPrefs.wifiOnly).thenAnswer((_) => false);
|
when(mockPrefs.wifiOnly).thenAnswer((_) => false);
|
||||||
final mockTorService = MockTorService();
|
final mockTorService = MockTorService();
|
||||||
|
@ -1549,7 +1549,7 @@ void main() {
|
||||||
|
|
||||||
verify(mockPrefs.wifiOnly).called(1);
|
verify(mockPrefs.wifiOnly).called(1);
|
||||||
verify(mockPrefs.useTor).called(1);
|
verify(mockPrefs.useTor).called(1);
|
||||||
verifyNever(mockPrefs.torKillswitch);
|
verifyNever(mockPrefs.torKillSwitch);
|
||||||
verifyNoMoreInteractions(mockPrefs);
|
verifyNoMoreInteractions(mockPrefs);
|
||||||
verifyNever(mockTorService.enabled);
|
verifyNever(mockTorService.enabled);
|
||||||
verifyNoMoreInteractions(mockTorService);
|
verifyNoMoreInteractions(mockTorService);
|
||||||
|
@ -1571,7 +1571,7 @@ void main() {
|
||||||
|
|
||||||
final mockPrefs = MockPrefs();
|
final mockPrefs = MockPrefs();
|
||||||
when(mockPrefs.useTor).thenAnswer((_) => true);
|
when(mockPrefs.useTor).thenAnswer((_) => true);
|
||||||
when(mockPrefs.torKillswitch).thenAnswer((_) => false);
|
when(mockPrefs.torKillSwitch).thenAnswer((_) => false);
|
||||||
when(mockPrefs.wifiOnly).thenAnswer((_) => false);
|
when(mockPrefs.wifiOnly).thenAnswer((_) => false);
|
||||||
|
|
||||||
final mockTorService = MockTorService();
|
final mockTorService = MockTorService();
|
||||||
|
@ -1599,7 +1599,7 @@ void main() {
|
||||||
|
|
||||||
verify(mockPrefs.wifiOnly).called(1);
|
verify(mockPrefs.wifiOnly).called(1);
|
||||||
verify(mockPrefs.useTor).called(1);
|
verify(mockPrefs.useTor).called(1);
|
||||||
verify(mockPrefs.torKillswitch).called(1);
|
verify(mockPrefs.torKillSwitch).called(1);
|
||||||
verifyNoMoreInteractions(mockPrefs);
|
verifyNoMoreInteractions(mockPrefs);
|
||||||
verify(mockTorService.enabled).called(1);
|
verify(mockTorService.enabled).called(1);
|
||||||
verifyNever(mockTorService.proxyInfo);
|
verifyNever(mockTorService.proxyInfo);
|
||||||
|
@ -1624,7 +1624,7 @@ void main() {
|
||||||
|
|
||||||
final mockPrefs = MockPrefs();
|
final mockPrefs = MockPrefs();
|
||||||
when(mockPrefs.useTor).thenAnswer((_) => true);
|
when(mockPrefs.useTor).thenAnswer((_) => true);
|
||||||
when(mockPrefs.torKillswitch).thenAnswer((_) => false); // Or true.
|
when(mockPrefs.torKillSwitch).thenAnswer((_) => false); // Or true.
|
||||||
when(mockPrefs.wifiOnly).thenAnswer((_) => false);
|
when(mockPrefs.wifiOnly).thenAnswer((_) => false);
|
||||||
|
|
||||||
final mockTorService = MockTorService();
|
final mockTorService = MockTorService();
|
||||||
|
@ -1651,7 +1651,7 @@ void main() {
|
||||||
verify(mockClient.proxyInfo).called(1);
|
verify(mockClient.proxyInfo).called(1);
|
||||||
verify(mockPrefs.wifiOnly).called(1);
|
verify(mockPrefs.wifiOnly).called(1);
|
||||||
verify(mockPrefs.useTor).called(1);
|
verify(mockPrefs.useTor).called(1);
|
||||||
verifyNever(mockPrefs.torKillswitch);
|
verifyNever(mockPrefs.torKillSwitch);
|
||||||
verifyNoMoreInteractions(mockPrefs);
|
verifyNoMoreInteractions(mockPrefs);
|
||||||
verify(mockTorService.enabled).called(1);
|
verify(mockTorService.enabled).called(1);
|
||||||
verify(mockTorService.proxyInfo).called(1);
|
verify(mockTorService.proxyInfo).called(1);
|
||||||
|
@ -1682,7 +1682,7 @@ void main() {
|
||||||
|
|
||||||
final mockPrefs = MockPrefs();
|
final mockPrefs = MockPrefs();
|
||||||
when(mockPrefs.useTor).thenAnswer((_) => true);
|
when(mockPrefs.useTor).thenAnswer((_) => true);
|
||||||
when(mockPrefs.torKillswitch).thenAnswer((_) => true);
|
when(mockPrefs.torKillSwitch).thenAnswer((_) => true);
|
||||||
when(mockPrefs.wifiOnly).thenAnswer((_) => false);
|
when(mockPrefs.wifiOnly).thenAnswer((_) => false);
|
||||||
final mockTorService = MockTorService();
|
final mockTorService = MockTorService();
|
||||||
when(mockTorService.enabled).thenAnswer((_) => false);
|
when(mockTorService.enabled).thenAnswer((_) => false);
|
||||||
|
@ -1710,7 +1710,7 @@ void main() {
|
||||||
|
|
||||||
verify(mockPrefs.wifiOnly).called(1);
|
verify(mockPrefs.wifiOnly).called(1);
|
||||||
verify(mockPrefs.useTor).called(1);
|
verify(mockPrefs.useTor).called(1);
|
||||||
verify(mockPrefs.torKillswitch).called(1);
|
verify(mockPrefs.torKillSwitch).called(1);
|
||||||
verifyNoMoreInteractions(mockPrefs);
|
verifyNoMoreInteractions(mockPrefs);
|
||||||
verify(mockTorService.enabled).called(1);
|
verify(mockTorService.enabled).called(1);
|
||||||
verifyNoMoreInteractions(mockTorService);
|
verifyNoMoreInteractions(mockTorService);
|
||||||
|
@ -1737,7 +1737,7 @@ void main() {
|
||||||
|
|
||||||
final mockPrefs = MockPrefs();
|
final mockPrefs = MockPrefs();
|
||||||
when(mockPrefs.useTor).thenAnswer((_) => true);
|
when(mockPrefs.useTor).thenAnswer((_) => true);
|
||||||
when(mockPrefs.torKillswitch).thenAnswer((_) => false);
|
when(mockPrefs.torKillSwitch).thenAnswer((_) => false);
|
||||||
when(mockPrefs.wifiOnly).thenAnswer((_) => false);
|
when(mockPrefs.wifiOnly).thenAnswer((_) => false);
|
||||||
final mockTorService = MockTorService();
|
final mockTorService = MockTorService();
|
||||||
when(mockTorService.enabled).thenAnswer((_) => false);
|
when(mockTorService.enabled).thenAnswer((_) => false);
|
||||||
|
@ -1761,7 +1761,7 @@ void main() {
|
||||||
|
|
||||||
verify(mockPrefs.wifiOnly).called(1);
|
verify(mockPrefs.wifiOnly).called(1);
|
||||||
verify(mockPrefs.useTor).called(1);
|
verify(mockPrefs.useTor).called(1);
|
||||||
verify(mockPrefs.torKillswitch).called(1);
|
verify(mockPrefs.torKillSwitch).called(1);
|
||||||
verifyNoMoreInteractions(mockPrefs);
|
verifyNoMoreInteractions(mockPrefs);
|
||||||
verify(mockTorService.enabled).called(1);
|
verify(mockTorService.enabled).called(1);
|
||||||
verifyNoMoreInteractions(mockTorService);
|
verifyNoMoreInteractions(mockTorService);
|
||||||
|
|
|
@ -15,6 +15,7 @@ import 'package:stackwallet/utilities/enums/backup_frequency_type.dart' as _i7;
|
||||||
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i9;
|
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i9;
|
||||||
import 'package:stackwallet/utilities/enums/sync_type_enum.dart' as _i6;
|
import 'package:stackwallet/utilities/enums/sync_type_enum.dart' as _i6;
|
||||||
import 'package:stackwallet/utilities/prefs.dart' as _i5;
|
import 'package:stackwallet/utilities/prefs.dart' as _i5;
|
||||||
|
import 'package:tor_ffi_plugin/tor_ffi_plugin.dart' as _i12;
|
||||||
|
|
||||||
// ignore_for_file: type=lint
|
// ignore_for_file: type=lint
|
||||||
// ignore_for_file: avoid_redundant_argument_values
|
// ignore_for_file: avoid_redundant_argument_values
|
||||||
|
@ -321,14 +322,14 @@ class MockPrefs extends _i1.Mock implements _i5.Prefs {
|
||||||
returnValueForMissingStub: null,
|
returnValueForMissingStub: null,
|
||||||
);
|
);
|
||||||
@override
|
@override
|
||||||
bool get torKillswitch => (super.noSuchMethod(
|
bool get torKillSwitch => (super.noSuchMethod(
|
||||||
Invocation.getter(#torKillswitch),
|
Invocation.getter(#torKillSwitch),
|
||||||
returnValue: false,
|
returnValue: false,
|
||||||
) as bool);
|
) as bool);
|
||||||
@override
|
@override
|
||||||
set torKillswitch(bool? torKillswitch) => super.noSuchMethod(
|
set torKillSwitch(bool? torKillswitch) => super.noSuchMethod(
|
||||||
Invocation.setter(
|
Invocation.setter(
|
||||||
#torKillswitch,
|
#torKillSwitch,
|
||||||
torKillswitch,
|
torKillswitch,
|
||||||
),
|
),
|
||||||
returnValueForMissingStub: null,
|
returnValueForMissingStub: null,
|
||||||
|
@ -674,6 +675,15 @@ class MockTorService extends _i1.Mock implements _i11.TorService {
|
||||||
),
|
),
|
||||||
) as ({_i3.InternetAddress host, int port}));
|
) as ({_i3.InternetAddress host, int port}));
|
||||||
@override
|
@override
|
||||||
|
void init({_i12.Tor? mockableOverride}) => super.noSuchMethod(
|
||||||
|
Invocation.method(
|
||||||
|
#init,
|
||||||
|
[],
|
||||||
|
{#mockableOverride: mockableOverride},
|
||||||
|
),
|
||||||
|
returnValueForMissingStub: null,
|
||||||
|
);
|
||||||
|
@override
|
||||||
_i4.Future<void> start() => (super.noSuchMethod(
|
_i4.Future<void> start() => (super.noSuchMethod(
|
||||||
Invocation.method(
|
Invocation.method(
|
||||||
#start,
|
#start,
|
||||||
|
|
|
@ -3,13 +3,14 @@
|
||||||
// Do not manually edit this file.
|
// Do not manually edit this file.
|
||||||
|
|
||||||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||||
import 'dart:async' as _i5;
|
import 'dart:async' as _i6;
|
||||||
import 'dart:typed_data' as _i6;
|
import 'dart:typed_data' as _i7;
|
||||||
|
|
||||||
import 'package:mockito/mockito.dart' as _i1;
|
import 'package:mockito/mockito.dart' as _i1;
|
||||||
import 'package:stackwallet/db/isar/main_db.dart' as _i2;
|
import 'package:stackwallet/db/isar/main_db.dart' as _i3;
|
||||||
import 'package:stackwallet/models/isar/stack_theme.dart' as _i4;
|
import 'package:stackwallet/models/isar/stack_theme.dart' as _i5;
|
||||||
import 'package:stackwallet/themes/theme_service.dart' as _i3;
|
import 'package:stackwallet/networking/http.dart' as _i2;
|
||||||
|
import 'package:stackwallet/themes/theme_service.dart' as _i4;
|
||||||
|
|
||||||
// ignore_for_file: type=lint
|
// ignore_for_file: type=lint
|
||||||
// ignore_for_file: avoid_redundant_argument_values
|
// ignore_for_file: avoid_redundant_argument_values
|
||||||
|
@ -22,8 +23,18 @@ import 'package:stackwallet/themes/theme_service.dart' as _i3;
|
||||||
// ignore_for_file: camel_case_types
|
// ignore_for_file: camel_case_types
|
||||||
// ignore_for_file: subtype_of_sealed_class
|
// ignore_for_file: subtype_of_sealed_class
|
||||||
|
|
||||||
class _FakeMainDB_0 extends _i1.SmartFake implements _i2.MainDB {
|
class _FakeHTTP_0 extends _i1.SmartFake implements _i2.HTTP {
|
||||||
_FakeMainDB_0(
|
_FakeHTTP_0(
|
||||||
|
Object parent,
|
||||||
|
Invocation parentInvocation,
|
||||||
|
) : super(
|
||||||
|
parent,
|
||||||
|
parentInvocation,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
class _FakeMainDB_1 extends _i1.SmartFake implements _i3.MainDB {
|
||||||
|
_FakeMainDB_1(
|
||||||
Object parent,
|
Object parent,
|
||||||
Invocation parentInvocation,
|
Invocation parentInvocation,
|
||||||
) : super(
|
) : super(
|
||||||
|
@ -35,26 +46,42 @@ class _FakeMainDB_0 extends _i1.SmartFake implements _i2.MainDB {
|
||||||
/// A class which mocks [ThemeService].
|
/// A class which mocks [ThemeService].
|
||||||
///
|
///
|
||||||
/// See the documentation for Mockito's code generation for more information.
|
/// See the documentation for Mockito's code generation for more information.
|
||||||
class MockThemeService extends _i1.Mock implements _i3.ThemeService {
|
class MockThemeService extends _i1.Mock implements _i4.ThemeService {
|
||||||
MockThemeService() {
|
MockThemeService() {
|
||||||
_i1.throwOnMissingStub(this);
|
_i1.throwOnMissingStub(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_i2.MainDB get db => (super.noSuchMethod(
|
_i2.HTTP get client => (super.noSuchMethod(
|
||||||
|
Invocation.getter(#client),
|
||||||
|
returnValue: _FakeHTTP_0(
|
||||||
|
this,
|
||||||
|
Invocation.getter(#client),
|
||||||
|
),
|
||||||
|
) as _i2.HTTP);
|
||||||
|
@override
|
||||||
|
set client(_i2.HTTP? _client) => super.noSuchMethod(
|
||||||
|
Invocation.setter(
|
||||||
|
#client,
|
||||||
|
_client,
|
||||||
|
),
|
||||||
|
returnValueForMissingStub: null,
|
||||||
|
);
|
||||||
|
@override
|
||||||
|
_i3.MainDB get db => (super.noSuchMethod(
|
||||||
Invocation.getter(#db),
|
Invocation.getter(#db),
|
||||||
returnValue: _FakeMainDB_0(
|
returnValue: _FakeMainDB_1(
|
||||||
this,
|
this,
|
||||||
Invocation.getter(#db),
|
Invocation.getter(#db),
|
||||||
),
|
),
|
||||||
) as _i2.MainDB);
|
) as _i3.MainDB);
|
||||||
@override
|
@override
|
||||||
List<_i4.StackTheme> get installedThemes => (super.noSuchMethod(
|
List<_i5.StackTheme> get installedThemes => (super.noSuchMethod(
|
||||||
Invocation.getter(#installedThemes),
|
Invocation.getter(#installedThemes),
|
||||||
returnValue: <_i4.StackTheme>[],
|
returnValue: <_i5.StackTheme>[],
|
||||||
) as List<_i4.StackTheme>);
|
) as List<_i5.StackTheme>);
|
||||||
@override
|
@override
|
||||||
void init(_i2.MainDB? db) => super.noSuchMethod(
|
void init(_i3.MainDB? db) => super.noSuchMethod(
|
||||||
Invocation.method(
|
Invocation.method(
|
||||||
#init,
|
#init,
|
||||||
[db],
|
[db],
|
||||||
|
@ -62,70 +89,70 @@ class MockThemeService extends _i1.Mock implements _i3.ThemeService {
|
||||||
returnValueForMissingStub: null,
|
returnValueForMissingStub: null,
|
||||||
);
|
);
|
||||||
@override
|
@override
|
||||||
_i5.Future<void> install({required _i6.Uint8List? themeArchiveData}) =>
|
_i6.Future<void> install({required _i7.Uint8List? themeArchiveData}) =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
Invocation.method(
|
Invocation.method(
|
||||||
#install,
|
#install,
|
||||||
[],
|
[],
|
||||||
{#themeArchiveData: themeArchiveData},
|
{#themeArchiveData: themeArchiveData},
|
||||||
),
|
),
|
||||||
returnValue: _i5.Future<void>.value(),
|
returnValue: _i6.Future<void>.value(),
|
||||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
returnValueForMissingStub: _i6.Future<void>.value(),
|
||||||
) as _i5.Future<void>);
|
) as _i6.Future<void>);
|
||||||
@override
|
@override
|
||||||
_i5.Future<void> remove({required String? themeId}) => (super.noSuchMethod(
|
_i6.Future<void> remove({required String? themeId}) => (super.noSuchMethod(
|
||||||
Invocation.method(
|
Invocation.method(
|
||||||
#remove,
|
#remove,
|
||||||
[],
|
[],
|
||||||
{#themeId: themeId},
|
{#themeId: themeId},
|
||||||
),
|
),
|
||||||
returnValue: _i5.Future<void>.value(),
|
returnValue: _i6.Future<void>.value(),
|
||||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
returnValueForMissingStub: _i6.Future<void>.value(),
|
||||||
) as _i5.Future<void>);
|
) as _i6.Future<void>);
|
||||||
@override
|
@override
|
||||||
_i5.Future<void> checkDefaultThemesOnStartup() => (super.noSuchMethod(
|
_i6.Future<void> checkDefaultThemesOnStartup() => (super.noSuchMethod(
|
||||||
Invocation.method(
|
Invocation.method(
|
||||||
#checkDefaultThemesOnStartup,
|
#checkDefaultThemesOnStartup,
|
||||||
[],
|
[],
|
||||||
),
|
),
|
||||||
returnValue: _i5.Future<void>.value(),
|
returnValue: _i6.Future<void>.value(),
|
||||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
returnValueForMissingStub: _i6.Future<void>.value(),
|
||||||
) as _i5.Future<void>);
|
) as _i6.Future<void>);
|
||||||
@override
|
@override
|
||||||
_i5.Future<bool> verifyInstalled({required String? themeId}) =>
|
_i6.Future<bool> verifyInstalled({required String? themeId}) =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
Invocation.method(
|
Invocation.method(
|
||||||
#verifyInstalled,
|
#verifyInstalled,
|
||||||
[],
|
[],
|
||||||
{#themeId: themeId},
|
{#themeId: themeId},
|
||||||
),
|
),
|
||||||
returnValue: _i5.Future<bool>.value(false),
|
returnValue: _i6.Future<bool>.value(false),
|
||||||
) as _i5.Future<bool>);
|
) as _i6.Future<bool>);
|
||||||
@override
|
@override
|
||||||
_i5.Future<List<_i3.StackThemeMetaData>> fetchThemes() => (super.noSuchMethod(
|
_i6.Future<List<_i4.StackThemeMetaData>> fetchThemes() => (super.noSuchMethod(
|
||||||
Invocation.method(
|
Invocation.method(
|
||||||
#fetchThemes,
|
#fetchThemes,
|
||||||
[],
|
[],
|
||||||
),
|
),
|
||||||
returnValue: _i5.Future<List<_i3.StackThemeMetaData>>.value(
|
returnValue: _i6.Future<List<_i4.StackThemeMetaData>>.value(
|
||||||
<_i3.StackThemeMetaData>[]),
|
<_i4.StackThemeMetaData>[]),
|
||||||
) as _i5.Future<List<_i3.StackThemeMetaData>>);
|
) as _i6.Future<List<_i4.StackThemeMetaData>>);
|
||||||
@override
|
@override
|
||||||
_i5.Future<_i6.Uint8List> fetchTheme(
|
_i6.Future<_i7.Uint8List> fetchTheme(
|
||||||
{required _i3.StackThemeMetaData? themeMetaData}) =>
|
{required _i4.StackThemeMetaData? themeMetaData}) =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
Invocation.method(
|
Invocation.method(
|
||||||
#fetchTheme,
|
#fetchTheme,
|
||||||
[],
|
[],
|
||||||
{#themeMetaData: themeMetaData},
|
{#themeMetaData: themeMetaData},
|
||||||
),
|
),
|
||||||
returnValue: _i5.Future<_i6.Uint8List>.value(_i6.Uint8List(0)),
|
returnValue: _i6.Future<_i7.Uint8List>.value(_i7.Uint8List(0)),
|
||||||
) as _i5.Future<_i6.Uint8List>);
|
) as _i6.Future<_i7.Uint8List>);
|
||||||
@override
|
@override
|
||||||
_i4.StackTheme? getTheme({required String? themeId}) =>
|
_i5.StackTheme? getTheme({required String? themeId}) =>
|
||||||
(super.noSuchMethod(Invocation.method(
|
(super.noSuchMethod(Invocation.method(
|
||||||
#getTheme,
|
#getTheme,
|
||||||
[],
|
[],
|
||||||
{#themeId: themeId},
|
{#themeId: themeId},
|
||||||
)) as _i4.StackTheme?);
|
)) as _i5.StackTheme?);
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,17 +1,18 @@
|
||||||
|
import 'dart:convert';
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:flutter_test/flutter_test.dart';
|
import 'package:flutter_test/flutter_test.dart';
|
||||||
import 'package:hive/hive.dart';
|
import 'package:hive/hive.dart';
|
||||||
import 'package:hive_test/hive_test.dart';
|
import 'package:hive_test/hive_test.dart';
|
||||||
import 'package:http/http.dart';
|
|
||||||
import 'package:mockito/annotations.dart';
|
import 'package:mockito/annotations.dart';
|
||||||
import 'package:mockito/mockito.dart';
|
import 'package:mockito/mockito.dart';
|
||||||
import 'package:stackwallet/db/hive/db.dart';
|
import 'package:stackwallet/db/hive/db.dart';
|
||||||
|
import 'package:stackwallet/networking/http.dart';
|
||||||
import 'package:stackwallet/services/price.dart';
|
import 'package:stackwallet/services/price.dart';
|
||||||
|
|
||||||
import 'price_test.mocks.dart';
|
import 'price_test.mocks.dart';
|
||||||
|
|
||||||
@GenerateMocks([Client])
|
@GenerateMocks([HTTP])
|
||||||
void main() {
|
void main() {
|
||||||
setUp(() async {
|
setUp(() async {
|
||||||
await setUpTestHive();
|
await setUpTestHive();
|
||||||
|
@ -22,10 +23,11 @@ void main() {
|
||||||
});
|
});
|
||||||
|
|
||||||
test("getPricesAnd24hChange fetch", () async {
|
test("getPricesAnd24hChange fetch", () async {
|
||||||
final client = MockClient();
|
final client = MockHTTP();
|
||||||
|
|
||||||
when(client.get(
|
when(client.get(
|
||||||
Uri.parse(
|
proxyInfo: null,
|
||||||
|
url: Uri.parse(
|
||||||
"https://api.coingecko.com/api/v3/coins/markets?vs_currency=btc&ids"
|
"https://api.coingecko.com/api/v3/coins/markets?vs_currency=btc&ids"
|
||||||
"=monero,bitcoin,litecoin,ecash,epic-cash,zcoin,dogecoin,bitcoin-cash"
|
"=monero,bitcoin,litecoin,ecash,epic-cash,zcoin,dogecoin,bitcoin-cash"
|
||||||
",namecoin,wownero,ethereum,particl,nano,banano,stellar,tezos"
|
",namecoin,wownero,ethereum,particl,nano,banano,stellar,tezos"
|
||||||
|
@ -34,63 +36,64 @@ void main() {
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json'
|
'Content-Type': 'application/json'
|
||||||
})).thenAnswer((_) async => Response(
|
})).thenAnswer((_) async => Response(
|
||||||
'[{"id":"bitcoin","symbol":"btc","name":"Bitcoin","image":"https://asse'
|
utf8.encode(
|
||||||
'ts.coingecko.com/coins/images/1/large/bitcoin.png?1547033579","curr'
|
'[{"id":"bitcoin","symbol":"btc","name":"Bitcoin","image":"https://asse'
|
||||||
'ent_price":1.0,"market_cap":19128800,"market_cap_rank":1,"fully_dil'
|
'ts.coingecko.com/coins/images/1/large/bitcoin.png?1547033579","curr'
|
||||||
'uted_valuation":21000000,"total_volume":1272132,"high_24h":1.0,"low'
|
'ent_price":1.0,"market_cap":19128800,"market_cap_rank":1,"fully_dil'
|
||||||
'_24h":1.0,"price_change_24h":0.0,"price_change_percentage_24h":0.0,'
|
'uted_valuation":21000000,"total_volume":1272132,"high_24h":1.0,"low'
|
||||||
'"market_cap_change_24h":950.0,"market_cap_change_percentage_24h":0.0'
|
'_24h":1.0,"price_change_24h":0.0,"price_change_percentage_24h":0.0,'
|
||||||
'0497,"circulating_supply":19128800.0,"total_supply":21000000.0,"max'
|
'"market_cap_change_24h":950.0,"market_cap_change_percentage_24h":0.0'
|
||||||
'_supply":21000000.0,"ath":1.003301,"ath_change_percentage":-0.32896'
|
'0497,"circulating_supply":19128800.0,"total_supply":21000000.0,"max'
|
||||||
',"ath_date":"2019-10-15T16:00:56.136Z","atl":0.99895134,"atl_change_'
|
'_supply":21000000.0,"ath":1.003301,"ath_change_percentage":-0.32896'
|
||||||
'percentage":0.10498,"atl_date":"2019-10-21T00:00:00.000Z","roi":nul'
|
',"ath_date":"2019-10-15T16:00:56.136Z","atl":0.99895134,"atl_change_'
|
||||||
'l,"last_updated":"2022-08-22T16:37:59.237Z"},{"id":"dogecoin","symb'
|
'percentage":0.10498,"atl_date":"2019-10-21T00:00:00.000Z","roi":nul'
|
||||||
'ol":"doge","name":"Dogecoin","image":"https://assets.coingecko.com/'
|
'l,"last_updated":"2022-08-22T16:37:59.237Z"},{"id":"dogecoin","symb'
|
||||||
'coins/images/5/large/dogecoin.png?1547792256","current_price":3.15e'
|
'ol":"doge","name":"Dogecoin","image":"https://assets.coingecko.com/'
|
||||||
'-06,"market_cap":417916,"market_cap_rank":10,"fully_diluted_valuati'
|
'coins/images/5/large/dogecoin.png?1547792256","current_price":3.15e'
|
||||||
'on":null,"total_volume":27498,"high_24h":3.26e-06,"low_24h":3.13e-0'
|
'-06,"market_cap":417916,"market_cap_rank":10,"fully_diluted_valuati'
|
||||||
'6,"price_change_24h":-8.6889947714e-08,"price_change_percentage_24h'
|
'on":null,"total_volume":27498,"high_24h":3.26e-06,"low_24h":3.13e-0'
|
||||||
'":-2.68533,"market_cap_change_24h":-11370.894861206936,"market_cap_c'
|
'6,"price_change_24h":-8.6889947714e-08,"price_change_percentage_24h'
|
||||||
'hange_percentage_24h":-2.64879,"circulating_supply":132670764299.89'
|
'":-2.68533,"market_cap_change_24h":-11370.894861206936,"market_cap_c'
|
||||||
'4,"total_supply":null,"max_supply":null,"ath":1.264e-05,"ath_change'
|
'hange_percentage_24h":-2.64879,"circulating_supply":132670764299.89'
|
||||||
'_percentage":-75.05046,"ath_date":"2021-05-07T23:04:53.026Z","atl":'
|
'4,"total_supply":null,"max_supply":null,"ath":1.264e-05,"ath_change'
|
||||||
'1.50936e-07,"atl_change_percentage":1989.69346,"atl_date":"2020-12-'
|
'_percentage":-75.05046,"ath_date":"2021-05-07T23:04:53.026Z","atl":'
|
||||||
'17T09:18:05.654Z","roi":null,"last_updated":"2022-08-22T16:38:15.11'
|
'1.50936e-07,"atl_change_percentage":1989.69346,"atl_date":"2020-12-'
|
||||||
'3Z"},{"id":"monero","symbol":"xmr","name":"Monero","image":"https:/'
|
'17T09:18:05.654Z","roi":null,"last_updated":"2022-08-22T16:38:15.11'
|
||||||
'/assets.coingecko.com/coins/images/69/large/monero_logo.png?1547033'
|
'3Z"},{"id":"monero","symbol":"xmr","name":"Monero","image":"https:/'
|
||||||
'729","current_price":0.00717236,"market_cap":130002,"market_cap_ran'
|
'/assets.coingecko.com/coins/images/69/large/monero_logo.png?1547033'
|
||||||
'k":29,"fully_diluted_valuation":null,"total_volume":4901,"high_24h":'
|
'729","current_price":0.00717236,"market_cap":130002,"market_cap_ran'
|
||||||
'0.00731999,"low_24h":0.00707511,"price_change_24h":-5.6133543212467'
|
'k":29,"fully_diluted_valuation":null,"total_volume":4901,"high_24h":'
|
||||||
'e-05,"price_change_percentage_24h":-0.77656,"market_cap_change_24h"'
|
'0.00731999,"low_24h":0.00707511,"price_change_24h":-5.6133543212467'
|
||||||
':-1007.8447677436197,"market_cap_change_percentage_24h":-0.76929,"c'
|
'e-05,"price_change_percentage_24h":-0.77656,"market_cap_change_24h"'
|
||||||
'irculating_supply":18147820.3764146,"total_supply":null,"max_supply'
|
':-1007.8447677436197,"market_cap_change_percentage_24h":-0.76929,"c'
|
||||||
'":null,"ath":0.03475393,"ath_change_percentage":-79.32037,"ath_date'
|
'irculating_supply":18147820.3764146,"total_supply":null,"max_supply'
|
||||||
'":"2018-01-09T00:00:00.000Z","atl":0.00101492,"atl_change_percentag'
|
'":null,"ath":0.03475393,"ath_change_percentage":-79.32037,"ath_date'
|
||||||
'e":608.13327,"atl_date":"2014-12-18T00:00:00.000Z","roi":null,"las'
|
'":"2018-01-09T00:00:00.000Z","atl":0.00101492,"atl_change_percentag'
|
||||||
't_updated":"2022-08-22T16:38:26.347Z"},{"id":"zcoin","symbol":"firo'
|
'e":608.13327,"atl_date":"2014-12-18T00:00:00.000Z","roi":null,"las'
|
||||||
'","name":"Firo","image":"https://assets.coingecko.com/coins/images/'
|
't_updated":"2022-08-22T16:38:26.347Z"},{"id":"zcoin","symbol":"firo'
|
||||||
'479/large/firocoingecko.png?1636537544","current_price":0.0001096,"'
|
'","name":"Firo","image":"https://assets.coingecko.com/coins/images/'
|
||||||
'market_cap":1252,"market_cap_rank":604,"fully_diluted_valuation":234'
|
'479/large/firocoingecko.png?1636537544","current_price":0.0001096,"'
|
||||||
'9,"total_volume":90.573,"high_24h":0.00011148,"low_24h":0.00010834,'
|
'market_cap":1252,"market_cap_rank":604,"fully_diluted_valuation":234'
|
||||||
'"price_change_24h":-9.87561775002e-07,"price_change_percentage_24h'
|
'9,"total_volume":90.573,"high_24h":0.00011148,"low_24h":0.00010834,'
|
||||||
'":-0.89304,"market_cap_change_24h":-10.046635178462793,"market_cap_'
|
'"price_change_24h":-9.87561775002e-07,"price_change_percentage_24h'
|
||||||
'change_percentage_24h":-0.79578,"circulating_supply":11411043.83546'
|
'":-0.89304,"market_cap_change_24h":-10.046635178462793,"market_cap_'
|
||||||
'97,"total_supply":21400000.0,"max_supply":21400000.0,"ath":0.016162'
|
'change_percentage_24h":-0.79578,"circulating_supply":11411043.83546'
|
||||||
'72,"ath_change_percentage":-99.3208,"ath_date":"2018-04-04T16:04:48.'
|
'97,"total_supply":21400000.0,"max_supply":21400000.0,"ath":0.016162'
|
||||||
'408Z","atl":4.268e-05,"atl_change_percentage":157.22799,"atl_date":"'
|
'72,"ath_change_percentage":-99.3208,"ath_date":"2018-04-04T16:04:48.'
|
||||||
'2022-05-12T07:28:47.088Z","roi":null,"last_updated":"2022-08-22T16'
|
'408Z","atl":4.268e-05,"atl_change_percentage":157.22799,"atl_date":"'
|
||||||
':38:47.229Z"},{"id":"epic-cash","symbol":"epic","name":"Epic Cash",'
|
'2022-05-12T07:28:47.088Z","roi":null,"last_updated":"2022-08-22T16'
|
||||||
'"image":"https://assets.coingecko.com/coins/images/9520/large/Epic_C'
|
':38:47.229Z"},{"id":"epic-cash","symbol":"epic","name":"Epic Cash",'
|
||||||
'oin_NO_drop_shadow.png?1620122642","current_price":2.803e-05,"marke'
|
'"image":"https://assets.coingecko.com/coins/images/9520/large/Epic_C'
|
||||||
't_cap":415.109,"market_cap_rank":953,"fully_diluted_valuation":null'
|
'oin_NO_drop_shadow.png?1620122642","current_price":2.803e-05,"marke'
|
||||||
',"total_volume":0.2371557,"high_24h":3.053e-05,"low_24h":2.581e-05'
|
't_cap":415.109,"market_cap_rank":953,"fully_diluted_valuation":null'
|
||||||
',"price_change_24h":1.9e-06,"price_change_percentage_24h":7.27524,"'
|
',"total_volume":0.2371557,"high_24h":3.053e-05,"low_24h":2.581e-05'
|
||||||
'market_cap_change_24h":28.26753,"market_cap_change_percentage_24h":'
|
',"price_change_24h":1.9e-06,"price_change_percentage_24h":7.27524,"'
|
||||||
'7.30726,"circulating_supply":14808052.0,"total_supply":21000000.0,"'
|
'market_cap_change_24h":28.26753,"market_cap_change_percentage_24h":'
|
||||||
'max_supply":null,"ath":0.00013848,"ath_change_percentage":-79.75864'
|
'7.30726,"circulating_supply":14808052.0,"total_supply":21000000.0,"'
|
||||||
',"ath_date":"2021-12-11T08:39:41.129Z","atl":5.74028e-07,"atl_chang'
|
'max_supply":null,"ath":0.00013848,"ath_change_percentage":-79.75864'
|
||||||
'e_percentage":4783.08078,"atl_date":"2020-03-13T16:55:01.177Z","roi'
|
',"ath_date":"2021-12-11T08:39:41.129Z","atl":5.74028e-07,"atl_chang'
|
||||||
'":null,"last_updated":"2022-08-22T16:38:32.826Z"}]',
|
'e_percentage":4783.08078,"atl_date":"2020-03-13T16:55:01.177Z","roi'
|
||||||
|
'":null,"last_updated":"2022-08-22T16:38:32.826Z"}]'),
|
||||||
200));
|
200));
|
||||||
|
|
||||||
final priceAPI = PriceAPI(client);
|
final priceAPI = PriceAPI(client);
|
||||||
|
@ -126,7 +129,8 @@ void main() {
|
||||||
'}',
|
'}',
|
||||||
);
|
);
|
||||||
verify(client.get(
|
verify(client.get(
|
||||||
Uri.parse(
|
proxyInfo: null,
|
||||||
|
url: Uri.parse(
|
||||||
"https://api.coingecko.com/api/v3/coins/markets?vs_currency=btc"
|
"https://api.coingecko.com/api/v3/coins/markets?vs_currency=btc"
|
||||||
"&ids=monero,bitcoin,litecoin,ecash,epic-cash,zcoin,dogecoin,"
|
"&ids=monero,bitcoin,litecoin,ecash,epic-cash,zcoin,dogecoin,"
|
||||||
"bitcoin-cash,namecoin,wownero,ethereum,particl,nano,banano,stellar"
|
"bitcoin-cash,namecoin,wownero,ethereum,particl,nano,banano,stellar"
|
||||||
|
@ -139,10 +143,11 @@ void main() {
|
||||||
});
|
});
|
||||||
|
|
||||||
test("cached price fetch", () async {
|
test("cached price fetch", () async {
|
||||||
final client = MockClient();
|
final client = MockHTTP();
|
||||||
|
|
||||||
when(client.get(
|
when(client.get(
|
||||||
Uri.parse(
|
proxyInfo: null,
|
||||||
|
url: Uri.parse(
|
||||||
"https://api.coingecko.com/api/v3/coins/markets?vs_currency=btc&"
|
"https://api.coingecko.com/api/v3/coins/markets?vs_currency=btc&"
|
||||||
"ids=monero,bitcoin,litecoin,ecash,epic-cash,zcoin,dogecoin,"
|
"ids=monero,bitcoin,litecoin,ecash,epic-cash,zcoin,dogecoin,"
|
||||||
"bitcoin-cash,namecoin,wownero,ethereum,particl,nano,banano,stellar"
|
"bitcoin-cash,namecoin,wownero,ethereum,particl,nano,banano,stellar"
|
||||||
|
@ -151,63 +156,64 @@ void main() {
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json'
|
'Content-Type': 'application/json'
|
||||||
})).thenAnswer((_) async => Response(
|
})).thenAnswer((_) async => Response(
|
||||||
'[{"id":"bitcoin","symbol":"btc","name":"Bitcoin","image":"https://a'
|
utf8.encode(
|
||||||
'ssets.coingecko.com/coins/images/1/large/bitcoin.png?1547033579","c'
|
'[{"id":"bitcoin","symbol":"btc","name":"Bitcoin","image":"https://a'
|
||||||
'urrent_price":1.0,"market_cap":19128800,"market_cap_rank":1,"fully_'
|
'ssets.coingecko.com/coins/images/1/large/bitcoin.png?1547033579","c'
|
||||||
'diluted_valuation":21000000,"total_volume":1272132,"high_24h":1.0,"'
|
'urrent_price":1.0,"market_cap":19128800,"market_cap_rank":1,"fully_'
|
||||||
'low_24h":1.0,"price_change_24h":0.0,"price_change_percentage_24h":0'
|
'diluted_valuation":21000000,"total_volume":1272132,"high_24h":1.0,"'
|
||||||
'.0,"market_cap_change_24h":950.0,"market_cap_change_percentage_24h"'
|
'low_24h":1.0,"price_change_24h":0.0,"price_change_percentage_24h":0'
|
||||||
':0.00497,"circulating_supply":19128800.0,"total_supply":21000000.0,"'
|
'.0,"market_cap_change_24h":950.0,"market_cap_change_percentage_24h"'
|
||||||
'max_supply":21000000.0,"ath":1.003301,"ath_change_percentage":-0.32'
|
':0.00497,"circulating_supply":19128800.0,"total_supply":21000000.0,"'
|
||||||
'896,"ath_date":"2019-10-15T16:00:56.136Z","atl":0.99895134,"atl_cha'
|
'max_supply":21000000.0,"ath":1.003301,"ath_change_percentage":-0.32'
|
||||||
'nge_percentage":0.10498,"atl_date":"2019-10-21T00:00:00.000Z","roi"'
|
'896,"ath_date":"2019-10-15T16:00:56.136Z","atl":0.99895134,"atl_cha'
|
||||||
':null,"last_updated":"2022-08-22T16:37:59.237Z"},{"id":"dogecoin","'
|
'nge_percentage":0.10498,"atl_date":"2019-10-21T00:00:00.000Z","roi"'
|
||||||
'symbol":"doge","name":"Dogecoin","image":"https://assets.coingecko.'
|
':null,"last_updated":"2022-08-22T16:37:59.237Z"},{"id":"dogecoin","'
|
||||||
'com/coins/images/5/large/dogecoin.png?1547792256","current_price":3'
|
'symbol":"doge","name":"Dogecoin","image":"https://assets.coingecko.'
|
||||||
'.15e-06,"market_cap":417916,"market_cap_rank":10,"fully_diluted_val'
|
'com/coins/images/5/large/dogecoin.png?1547792256","current_price":3'
|
||||||
'uation":null,"total_volume":27498,"high_24h":3.26e-06,"low_24h":3.1'
|
'.15e-06,"market_cap":417916,"market_cap_rank":10,"fully_diluted_val'
|
||||||
'3e-06,"price_change_24h":-8.6889947714e-08,"price_change_percentage'
|
'uation":null,"total_volume":27498,"high_24h":3.26e-06,"low_24h":3.1'
|
||||||
'_24h":-2.68533,"market_cap_change_24h":-11370.894861206936,"market_'
|
'3e-06,"price_change_24h":-8.6889947714e-08,"price_change_percentage'
|
||||||
'cap_change_percentage_24h":-2.64879,"circulating_supply":1326707642'
|
'_24h":-2.68533,"market_cap_change_24h":-11370.894861206936,"market_'
|
||||||
'99.894,"total_supply":null,"max_supply":null,"ath":1.264e-05,"ath_c'
|
'cap_change_percentage_24h":-2.64879,"circulating_supply":1326707642'
|
||||||
'hange_percentage":-75.05046,"ath_date":"2021-05-07T23:04:53.026Z","'
|
'99.894,"total_supply":null,"max_supply":null,"ath":1.264e-05,"ath_c'
|
||||||
'atl":1.50936e-07,"atl_change_percentage":1989.69346,"atl_date":"202'
|
'hange_percentage":-75.05046,"ath_date":"2021-05-07T23:04:53.026Z","'
|
||||||
'0-12-17T09:18:05.654Z","roi":null,"last_updated":"2022-08-22T16:38:'
|
'atl":1.50936e-07,"atl_change_percentage":1989.69346,"atl_date":"202'
|
||||||
'15.113Z"},{"id":"monero","symbol":"xmr","name":"Monero","image":"ht'
|
'0-12-17T09:18:05.654Z","roi":null,"last_updated":"2022-08-22T16:38:'
|
||||||
'tps://assets.coingecko.com/coins/images/69/large/monero_logo.png?15'
|
'15.113Z"},{"id":"monero","symbol":"xmr","name":"Monero","image":"ht'
|
||||||
'47033729","current_price":0.00717236,"market_cap":130002,"market_cap'
|
'tps://assets.coingecko.com/coins/images/69/large/monero_logo.png?15'
|
||||||
'_rank":29,"fully_diluted_valuation":null,"total_volume":4901,"high'
|
'47033729","current_price":0.00717236,"market_cap":130002,"market_cap'
|
||||||
'_24h":0.00731999,"low_24h":0.00707511,"price_change_24h":-5.613354'
|
'_rank":29,"fully_diluted_valuation":null,"total_volume":4901,"high'
|
||||||
'3212467e-05,"price_change_percentage_24h":-0.77656,"market_cap_chan'
|
'_24h":0.00731999,"low_24h":0.00707511,"price_change_24h":-5.613354'
|
||||||
'ge_24h":-1007.8447677436197,"market_cap_change_percentage_24h":-0.7'
|
'3212467e-05,"price_change_percentage_24h":-0.77656,"market_cap_chan'
|
||||||
'6929,"circulating_supply":18147820.3764146,"total_supply":null,"ma'
|
'ge_24h":-1007.8447677436197,"market_cap_change_percentage_24h":-0.7'
|
||||||
'x_supply":null,"ath":0.03475393,"ath_change_percentage":-79.32037,"'
|
'6929,"circulating_supply":18147820.3764146,"total_supply":null,"ma'
|
||||||
'ath_date":"2018-01-09T00:00:00.000Z","atl":0.00101492,"atl_change_'
|
'x_supply":null,"ath":0.03475393,"ath_change_percentage":-79.32037,"'
|
||||||
'percentage":608.13327,"atl_date":"2014-12-18T00:00:00.000Z","roi":n'
|
'ath_date":"2018-01-09T00:00:00.000Z","atl":0.00101492,"atl_change_'
|
||||||
'ull,"last_updated":"2022-08-22T16:38:26.347Z"},{"id":"zcoin","symbo'
|
'percentage":608.13327,"atl_date":"2014-12-18T00:00:00.000Z","roi":n'
|
||||||
'l":"firo","name":"Firo","image":"https://assets.coingecko.com/coins'
|
'ull,"last_updated":"2022-08-22T16:38:26.347Z"},{"id":"zcoin","symbo'
|
||||||
'/images/479/large/firocoingecko.png?1636537544","current_price":0.0'
|
'l":"firo","name":"Firo","image":"https://assets.coingecko.com/coins'
|
||||||
'001096,"market_cap":1252,"market_cap_rank":604,"fully_diluted_valu'
|
'/images/479/large/firocoingecko.png?1636537544","current_price":0.0'
|
||||||
'ation":2349,"total_volume":90.573,"high_24h":0.00011148,"low_24h":0'
|
'001096,"market_cap":1252,"market_cap_rank":604,"fully_diluted_valu'
|
||||||
'.00010834,"price_change_24h":-9.87561775002e-07,"price_change_perce'
|
'ation":2349,"total_volume":90.573,"high_24h":0.00011148,"low_24h":0'
|
||||||
'ntage_24h":-0.89304,"market_cap_change_24h":-10.046635178462793,"ma'
|
'.00010834,"price_change_24h":-9.87561775002e-07,"price_change_perce'
|
||||||
'rket_cap_change_percentage_24h":-0.79578,"circulating_supply":11411'
|
'ntage_24h":-0.89304,"market_cap_change_24h":-10.046635178462793,"ma'
|
||||||
'043.8354697,"total_supply":21400000.0,"max_supply":21400000.0,"ath"'
|
'rket_cap_change_percentage_24h":-0.79578,"circulating_supply":11411'
|
||||||
':0.01616272,"ath_change_percentage":-99.3208,"ath_date":"2018-04-04'
|
'043.8354697,"total_supply":21400000.0,"max_supply":21400000.0,"ath"'
|
||||||
'T16:04:48.408Z","atl":4.268e-05,"atl_change_percentage":157.22799,'
|
':0.01616272,"ath_change_percentage":-99.3208,"ath_date":"2018-04-04'
|
||||||
'"atl_date":"2022-05-12T07:28:47.088Z","roi":null,"last_updated":"2'
|
'T16:04:48.408Z","atl":4.268e-05,"atl_change_percentage":157.22799,'
|
||||||
'022-08-22T16:38:47.229Z"},{"id":"epic-cash","symbol":"epic","name":"'
|
'"atl_date":"2022-05-12T07:28:47.088Z","roi":null,"last_updated":"2'
|
||||||
'Epic Cash","image":"https://assets.coingecko.com/coins/images/9520/'
|
'022-08-22T16:38:47.229Z"},{"id":"epic-cash","symbol":"epic","name":"'
|
||||||
'large/Epic_Coin_NO_drop_shadow.png?1620122642","current_price":2.80'
|
'Epic Cash","image":"https://assets.coingecko.com/coins/images/9520/'
|
||||||
'3e-05,"market_cap":415.109,"market_cap_rank":953,"fully_diluted_val'
|
'large/Epic_Coin_NO_drop_shadow.png?1620122642","current_price":2.80'
|
||||||
'uation":null,"total_volume":0.2371557,"high_24h":3.053e-05,"low_24h'
|
'3e-05,"market_cap":415.109,"market_cap_rank":953,"fully_diluted_val'
|
||||||
'":2.581e-05,"price_change_24h":1.9e-06,"price_change_percentage_24'
|
'uation":null,"total_volume":0.2371557,"high_24h":3.053e-05,"low_24h'
|
||||||
'h":7.27524,"market_cap_change_24h":28.26753,"market_cap_change_perc'
|
'":2.581e-05,"price_change_24h":1.9e-06,"price_change_percentage_24'
|
||||||
'entage_24h":7.30726,"circulating_supply":14808052.0,"total_supply":'
|
'h":7.27524,"market_cap_change_24h":28.26753,"market_cap_change_perc'
|
||||||
'21000000.0,"max_supply":null,"ath":0.00013848,"ath_change_percentag'
|
'entage_24h":7.30726,"circulating_supply":14808052.0,"total_supply":'
|
||||||
'e":-79.75864,"ath_date":"2021-12-11T08:39:41.129Z","atl":5.74028e-0'
|
'21000000.0,"max_supply":null,"ath":0.00013848,"ath_change_percentag'
|
||||||
'7,"atl_change_percentage":4783.08078,"atl_date":"2020-03-13T16:55:01'
|
'e":-79.75864,"ath_date":"2021-12-11T08:39:41.129Z","atl":5.74028e-0'
|
||||||
'.177Z","roi":null,"last_updated":"2022-08-22T16:38:32.826Z"}]',
|
'7,"atl_change_percentage":4783.08078,"atl_date":"2020-03-13T16:55:01'
|
||||||
|
'.177Z","roi":null,"last_updated":"2022-08-22T16:38:32.826Z"}]'),
|
||||||
200));
|
200));
|
||||||
|
|
||||||
final priceAPI = PriceAPI(client);
|
final priceAPI = PriceAPI(client);
|
||||||
|
@ -247,7 +253,8 @@ void main() {
|
||||||
|
|
||||||
// verify only called once during filling of cache
|
// verify only called once during filling of cache
|
||||||
verify(client.get(
|
verify(client.get(
|
||||||
Uri.parse(
|
proxyInfo: null,
|
||||||
|
url: Uri.parse(
|
||||||
"https://api.coingecko.com/api/v3/coins/markets?vs_currency=btc&ids"
|
"https://api.coingecko.com/api/v3/coins/markets?vs_currency=btc&ids"
|
||||||
"=monero,bitcoin,litecoin,ecash,epic-cash,zcoin,dogecoin,"
|
"=monero,bitcoin,litecoin,ecash,epic-cash,zcoin,dogecoin,"
|
||||||
"bitcoin-cash,namecoin,wownero,ethereum,particl,nano,banano,stellar"
|
"bitcoin-cash,namecoin,wownero,ethereum,particl,nano,banano,stellar"
|
||||||
|
@ -259,10 +266,11 @@ void main() {
|
||||||
});
|
});
|
||||||
|
|
||||||
test("response parse failure", () async {
|
test("response parse failure", () async {
|
||||||
final client = MockClient();
|
final client = MockHTTP();
|
||||||
|
|
||||||
when(client.get(
|
when(client.get(
|
||||||
Uri.parse(
|
proxyInfo: null,
|
||||||
|
url: Uri.parse(
|
||||||
"https://api.coingecko.com/api/v3/coins/markets?vs_currency=btc"
|
"https://api.coingecko.com/api/v3/coins/markets?vs_currency=btc"
|
||||||
"&ids=monero,bitcoin,litecoin,ecash,epic-cash,zcoin,dogecoin,"
|
"&ids=monero,bitcoin,litecoin,ecash,epic-cash,zcoin,dogecoin,"
|
||||||
"bitcoin-cash,namecoin,wownero,ethereum,particl,nano,banano,stellar"
|
"bitcoin-cash,namecoin,wownero,ethereum,particl,nano,banano,stellar"
|
||||||
|
@ -271,64 +279,65 @@ void main() {
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json'
|
'Content-Type': 'application/json'
|
||||||
})).thenAnswer((_) async => Response(
|
})).thenAnswer((_) async => Response(
|
||||||
'[{"id":"bitcoin","symbol":"btc","name":com/coins/images/1/large/'
|
utf8.encode(
|
||||||
'bitcoin.png?1547033579","current_price":1.0,"market_cap":19128800'
|
'[{"id":"bitcoin","symbol":"btc","name":com/coins/images/1/large/'
|
||||||
',"market_cap_rank":1,"fully_diluted_valuation":21000000,"total_volum'
|
'bitcoin.png?1547033579","current_price":1.0,"market_cap":19128800'
|
||||||
'e":1272132,"high_24h":1.0,"low_24h":1.0,"price_change_24h":0.0,"pri'
|
',"market_cap_rank":1,"fully_diluted_valuation":21000000,"total_volum'
|
||||||
'ce_change_percentage_24h":0.0,"market_cap_change_24h":950.0,"market_'
|
'e":1272132,"high_24h":1.0,"low_24h":1.0,"price_change_24h":0.0,"pri'
|
||||||
'cap_change_percentage_24h":0.00497,"circulating_supply":19128800.0,"t'
|
'ce_change_percentage_24h":0.0,"market_cap_change_24h":950.0,"market_'
|
||||||
'otal_supply":21000000.0,"max_supply":21000000.0,"ath":1.003301,"ath'
|
'cap_change_percentage_24h":0.00497,"circulating_supply":19128800.0,"t'
|
||||||
'_change_percentage":-0.32896,"ath_date":"2019-10-15T16:00:56.136Z",'
|
'otal_supply":21000000.0,"max_supply":21000000.0,"ath":1.003301,"ath'
|
||||||
'"atl":0.99895134,"atl_change_percentage":0.10498,"atl_date":'
|
'_change_percentage":-0.32896,"ath_date":"2019-10-15T16:00:56.136Z",'
|
||||||
'"2019-10-21T00:00:00.000Z","roi":null,'
|
'"atl":0.99895134,"atl_change_percentage":0.10498,"atl_date":'
|
||||||
'"last_updated":"2022-08-22T16:37:59.237Z"},{"id":"dogecoin"'
|
'"2019-10-21T00:00:00.000Z","roi":null,'
|
||||||
',"symbol":"doge","name":"Dogecoin","image":'
|
'"last_updated":"2022-08-22T16:37:59.237Z"},{"id":"dogecoin"'
|
||||||
'"https://assets.coingecko.com/coins/images/5/large/dogecoin.png?1547792256",'
|
',"symbol":"doge","name":"Dogecoin","image":'
|
||||||
'"current_price":3.15e-06,"market_cap":417916,"market_cap_rank":10'
|
'"https://assets.coingecko.com/coins/images/5/large/dogecoin.png?1547792256",'
|
||||||
',"fully_diluted_valuation":null,"total_volume":27498,"high_24h":3'
|
'"current_price":3.15e-06,"market_cap":417916,"market_cap_rank":10'
|
||||||
'.26e-06,"low_24h":3.13e-06,"price_change_24h":-8.6889947714e-08,"'
|
',"fully_diluted_valuation":null,"total_volume":27498,"high_24h":3'
|
||||||
'price_change_percentage_24h":-2.68533,"market_cap_change_24h":-11'
|
'.26e-06,"low_24h":3.13e-06,"price_change_24h":-8.6889947714e-08,"'
|
||||||
'370.894861206936,"market_cap_change_percentage_24h":-2.64879,"cir'
|
'price_change_percentage_24h":-2.68533,"market_cap_change_24h":-11'
|
||||||
'culating_supply":132670764299.894,"total_supply":null,"max_supply'
|
'370.894861206936,"market_cap_change_percentage_24h":-2.64879,"cir'
|
||||||
'":null,"ath":1.264e-05,"ath_change_percentage":-75.05046,"ath_date'
|
'culating_supply":132670764299.894,"total_supply":null,"max_supply'
|
||||||
'":"2021-05-07T23:04:53.026Z","atl":1.50936e-07,"atl_change_percen'
|
'":null,"ath":1.264e-05,"ath_change_percentage":-75.05046,"ath_date'
|
||||||
'tage":1989.69346,"atl_date":"2020-12-17T09:18:05.654Z","roi":null,'
|
'":"2021-05-07T23:04:53.026Z","atl":1.50936e-07,"atl_change_percen'
|
||||||
'"last_updated":"2022-08-22T16:38:15.113Z"},{"id":"monero","symbol"'
|
'tage":1989.69346,"atl_date":"2020-12-17T09:18:05.654Z","roi":null,'
|
||||||
':"xmr","name":"Monero","image":"https://assets.coingecko.com/coins'
|
'"last_updated":"2022-08-22T16:38:15.113Z"},{"id":"monero","symbol"'
|
||||||
'/images/69/large/monero_logo.png?1547033729","current_price":0.007'
|
':"xmr","name":"Monero","image":"https://assets.coingecko.com/coins'
|
||||||
'17236,"market_cap":130002,"market_cap_rank":29,"fully_diluted_valu'
|
'/images/69/large/monero_logo.png?1547033729","current_price":0.007'
|
||||||
'ation":null,"total_volume":4901,"high_24h":0.00731999,"low_24h":0.'
|
'17236,"market_cap":130002,"market_cap_rank":29,"fully_diluted_valu'
|
||||||
'00707511,"price_change_24h":-5.6133543212467e-05,"price_change_per'
|
'ation":null,"total_volume":4901,"high_24h":0.00731999,"low_24h":0.'
|
||||||
'centage_24h":-0.77656,"market_cap_change_24h":-1007.8447677436197'
|
'00707511,"price_change_24h":-5.6133543212467e-05,"price_change_per'
|
||||||
',"market_cap_change_percentage_24h":-0.76929,"circulating_supply":'
|
'centage_24h":-0.77656,"market_cap_change_24h":-1007.8447677436197'
|
||||||
'18147820.3764146,"total_supply":null,"max_supply":null,"ath":0.034'
|
',"market_cap_change_percentage_24h":-0.76929,"circulating_supply":'
|
||||||
'75393,"ath_change_percentage":-79.32037,"ath_date":"2018-01-09T00:'
|
'18147820.3764146,"total_supply":null,"max_supply":null,"ath":0.034'
|
||||||
'00:00.000Z","atl":0.00101492,"atl_change_percentage":608.13327,"at'
|
'75393,"ath_change_percentage":-79.32037,"ath_date":"2018-01-09T00:'
|
||||||
'l_date":"2014-12-18T00:00:00.000Z","roi":null,"last_updated":"2022'
|
'00:00.000Z","atl":0.00101492,"atl_change_percentage":608.13327,"at'
|
||||||
'-08-22T16:38:26.347Z"},{"id":"zcoin","symbol":"firo","name":"Firo"'
|
'l_date":"2014-12-18T00:00:00.000Z","roi":null,"last_updated":"2022'
|
||||||
',"image":"https://assets.coingecko.com/coins/images/479/large/firo'
|
'-08-22T16:38:26.347Z"},{"id":"zcoin","symbol":"firo","name":"Firo"'
|
||||||
'coingecko.png?1636537544","current_price":0.0001096,"market_cap":1'
|
',"image":"https://assets.coingecko.com/coins/images/479/large/firo'
|
||||||
'252,"market_cap_rank":604,"fully_diluted_valuation":2349,"total_vo'
|
'coingecko.png?1636537544","current_price":0.0001096,"market_cap":1'
|
||||||
'lume":90.573,"high_24h":0.00011148,"low_24h":0.00010834,"price_chang'
|
'252,"market_cap_rank":604,"fully_diluted_valuation":2349,"total_vo'
|
||||||
'e_24h":-9.87561775002e-07,"price_change_percentage_24h":-0.89304,'
|
'lume":90.573,"high_24h":0.00011148,"low_24h":0.00010834,"price_chang'
|
||||||
'"market_cap_change_24h":-10.046635178462793,"market_cap_change_per'
|
'e_24h":-9.87561775002e-07,"price_change_percentage_24h":-0.89304,'
|
||||||
'centage_24h":-0.79578,"circulating_supply":11411043.8354697,"tota'
|
'"market_cap_change_24h":-10.046635178462793,"market_cap_change_per'
|
||||||
'l_supply":21400000.0,"max_supply":21400000.0,"ath":0.01616272,"ath'
|
'centage_24h":-0.79578,"circulating_supply":11411043.8354697,"tota'
|
||||||
'_change_percentage":-99.3208,"ath_date":"2018-04-04T16:04:48.408Z"'
|
'l_supply":21400000.0,"max_supply":21400000.0,"ath":0.01616272,"ath'
|
||||||
',"atl":4.268e-05,"atl_change_percentage":157.22799,"atl_date":"202'
|
'_change_percentage":-99.3208,"ath_date":"2018-04-04T16:04:48.408Z"'
|
||||||
'2-05-12T07:28:47.088Z","roi":null,"last_updated":"2022-08-22T16:3'
|
',"atl":4.268e-05,"atl_change_percentage":157.22799,"atl_date":"202'
|
||||||
'8:47.229Z"},{"id":"epic-cash","symbol":"epic","name":"Epic Cash",'
|
'2-05-12T07:28:47.088Z","roi":null,"last_updated":"2022-08-22T16:3'
|
||||||
'"image":"https://assets.coingecko.com/coins/images/9520/large/'
|
'8:47.229Z"},{"id":"epic-cash","symbol":"epic","name":"Epic Cash",'
|
||||||
'Epic_Coin_NO_drop_shadow.png?1620122642","current_price":2.803e-0'
|
'"image":"https://assets.coingecko.com/coins/images/9520/large/'
|
||||||
'5,"market_cap":415.109,"market_cap_rank":953,"fully_diluted_valuat'
|
'Epic_Coin_NO_drop_shadow.png?1620122642","current_price":2.803e-0'
|
||||||
'ion":null,"total_volume":0.2371557,"high_24h":3.053e-05,"low_24h":'
|
'5,"market_cap":415.109,"market_cap_rank":953,"fully_diluted_valuat'
|
||||||
'2.581e-05,"price_change_24h":1.9e-06,"price_change_percentage_24h"'
|
'ion":null,"total_volume":0.2371557,"high_24h":3.053e-05,"low_24h":'
|
||||||
':7.27524,"market_cap_change_24h":28.26753,"market_cap_change_per'
|
'2.581e-05,"price_change_24h":1.9e-06,"price_change_percentage_24h"'
|
||||||
'centage_24h":7.30726,"circulating_supply":14808052.0,"total_suppl'
|
':7.27524,"market_cap_change_24h":28.26753,"market_cap_change_per'
|
||||||
'y":21000000.0,"max_supply":null,"ath":0.00013848,"ath_change_perce'
|
'centage_24h":7.30726,"circulating_supply":14808052.0,"total_suppl'
|
||||||
'ntage":-79.75864,"ath_date":"2021-12-11T08:39:41.129Z","atl":5.74'
|
'y":21000000.0,"max_supply":null,"ath":0.00013848,"ath_change_perce'
|
||||||
'028e-07,"atl_change_percentage":4783.08078,"atl_date":"2020-03-13T'
|
'ntage":-79.75864,"ath_date":"2021-12-11T08:39:41.129Z","atl":5.74'
|
||||||
'16:55:01.177Z","roi":null,"last_updated":"2022-08-22T16:38:32.826Z"}]',
|
'028e-07,"atl_change_percentage":4783.08078,"atl_date":"2020-03-13T'
|
||||||
|
'16:55:01.177Z","roi":null,"last_updated":"2022-08-22T16:38:32.826Z"}]'),
|
||||||
200));
|
200));
|
||||||
|
|
||||||
final priceAPI = PriceAPI(client);
|
final priceAPI = PriceAPI(client);
|
||||||
|
@ -365,10 +374,11 @@ void main() {
|
||||||
});
|
});
|
||||||
|
|
||||||
test("no internet available", () async {
|
test("no internet available", () async {
|
||||||
final client = MockClient();
|
final client = MockHTTP();
|
||||||
|
|
||||||
when(client.get(
|
when(client.get(
|
||||||
Uri.parse(
|
proxyInfo: null,
|
||||||
|
url: Uri.parse(
|
||||||
"https://api.coingecko.com/api/v3/coins/markets?vs_currency=btc"
|
"https://api.coingecko.com/api/v3/coins/markets?vs_currency=btc"
|
||||||
"&ids=monero,bitcoin,litecoin,ecash,epic-cash,zcoin,dogecoin,"
|
"&ids=monero,bitcoin,litecoin,ecash,epic-cash,zcoin,dogecoin,"
|
||||||
"bitcoin-cash,namecoin,wownero,ethereum,particl,nano,banano,stellar"
|
"bitcoin-cash,namecoin,wownero,ethereum,particl,nano,banano,stellar"
|
||||||
|
|
|
@ -4,11 +4,11 @@
|
||||||
|
|
||||||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||||
import 'dart:async' as _i3;
|
import 'dart:async' as _i3;
|
||||||
import 'dart:convert' as _i4;
|
import 'dart:convert' as _i5;
|
||||||
import 'dart:typed_data' as _i5;
|
import 'dart:io' as _i4;
|
||||||
|
|
||||||
import 'package:http/http.dart' as _i2;
|
|
||||||
import 'package:mockito/mockito.dart' as _i1;
|
import 'package:mockito/mockito.dart' as _i1;
|
||||||
|
import 'package:stackwallet/networking/http.dart' as _i2;
|
||||||
|
|
||||||
// ignore_for_file: type=lint
|
// ignore_for_file: type=lint
|
||||||
// ignore_for_file: avoid_redundant_argument_values
|
// ignore_for_file: avoid_redundant_argument_values
|
||||||
|
@ -31,233 +31,76 @@ class _FakeResponse_0 extends _i1.SmartFake implements _i2.Response {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
class _FakeStreamedResponse_1 extends _i1.SmartFake
|
/// A class which mocks [HTTP].
|
||||||
implements _i2.StreamedResponse {
|
|
||||||
_FakeStreamedResponse_1(
|
|
||||||
Object parent,
|
|
||||||
Invocation parentInvocation,
|
|
||||||
) : super(
|
|
||||||
parent,
|
|
||||||
parentInvocation,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// A class which mocks [Client].
|
|
||||||
///
|
///
|
||||||
/// See the documentation for Mockito's code generation for more information.
|
/// See the documentation for Mockito's code generation for more information.
|
||||||
class MockClient extends _i1.Mock implements _i2.Client {
|
class MockHTTP extends _i1.Mock implements _i2.HTTP {
|
||||||
MockClient() {
|
MockHTTP() {
|
||||||
_i1.throwOnMissingStub(this);
|
_i1.throwOnMissingStub(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_i3.Future<_i2.Response> head(
|
_i3.Future<_i2.Response> get({
|
||||||
Uri? url, {
|
required Uri? url,
|
||||||
Map<String, String>? headers,
|
|
||||||
}) =>
|
|
||||||
(super.noSuchMethod(
|
|
||||||
Invocation.method(
|
|
||||||
#head,
|
|
||||||
[url],
|
|
||||||
{#headers: headers},
|
|
||||||
),
|
|
||||||
returnValue: _i3.Future<_i2.Response>.value(_FakeResponse_0(
|
|
||||||
this,
|
|
||||||
Invocation.method(
|
|
||||||
#head,
|
|
||||||
[url],
|
|
||||||
{#headers: headers},
|
|
||||||
),
|
|
||||||
)),
|
|
||||||
) as _i3.Future<_i2.Response>);
|
|
||||||
@override
|
|
||||||
_i3.Future<_i2.Response> get(
|
|
||||||
Uri? url, {
|
|
||||||
Map<String, String>? headers,
|
Map<String, String>? headers,
|
||||||
|
required ({_i4.InternetAddress host, int port})? proxyInfo,
|
||||||
}) =>
|
}) =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
Invocation.method(
|
Invocation.method(
|
||||||
#get,
|
#get,
|
||||||
[url],
|
[],
|
||||||
{#headers: headers},
|
{
|
||||||
|
#url: url,
|
||||||
|
#headers: headers,
|
||||||
|
#proxyInfo: proxyInfo,
|
||||||
|
},
|
||||||
),
|
),
|
||||||
returnValue: _i3.Future<_i2.Response>.value(_FakeResponse_0(
|
returnValue: _i3.Future<_i2.Response>.value(_FakeResponse_0(
|
||||||
this,
|
this,
|
||||||
Invocation.method(
|
Invocation.method(
|
||||||
#get,
|
#get,
|
||||||
[url],
|
[],
|
||||||
{#headers: headers},
|
{
|
||||||
|
#url: url,
|
||||||
|
#headers: headers,
|
||||||
|
#proxyInfo: proxyInfo,
|
||||||
|
},
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
) as _i3.Future<_i2.Response>);
|
) as _i3.Future<_i2.Response>);
|
||||||
@override
|
@override
|
||||||
_i3.Future<_i2.Response> post(
|
_i3.Future<_i2.Response> post({
|
||||||
Uri? url, {
|
required Uri? url,
|
||||||
Map<String, String>? headers,
|
Map<String, String>? headers,
|
||||||
Object? body,
|
Object? body,
|
||||||
_i4.Encoding? encoding,
|
_i5.Encoding? encoding,
|
||||||
|
required ({_i4.InternetAddress host, int port})? proxyInfo,
|
||||||
}) =>
|
}) =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
Invocation.method(
|
Invocation.method(
|
||||||
#post,
|
#post,
|
||||||
[url],
|
[],
|
||||||
{
|
{
|
||||||
|
#url: url,
|
||||||
#headers: headers,
|
#headers: headers,
|
||||||
#body: body,
|
#body: body,
|
||||||
#encoding: encoding,
|
#encoding: encoding,
|
||||||
|
#proxyInfo: proxyInfo,
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
returnValue: _i3.Future<_i2.Response>.value(_FakeResponse_0(
|
returnValue: _i3.Future<_i2.Response>.value(_FakeResponse_0(
|
||||||
this,
|
this,
|
||||||
Invocation.method(
|
Invocation.method(
|
||||||
#post,
|
#post,
|
||||||
[url],
|
[],
|
||||||
{
|
{
|
||||||
|
#url: url,
|
||||||
#headers: headers,
|
#headers: headers,
|
||||||
#body: body,
|
#body: body,
|
||||||
#encoding: encoding,
|
#encoding: encoding,
|
||||||
|
#proxyInfo: proxyInfo,
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
) as _i3.Future<_i2.Response>);
|
) as _i3.Future<_i2.Response>);
|
||||||
@override
|
|
||||||
_i3.Future<_i2.Response> put(
|
|
||||||
Uri? url, {
|
|
||||||
Map<String, String>? headers,
|
|
||||||
Object? body,
|
|
||||||
_i4.Encoding? encoding,
|
|
||||||
}) =>
|
|
||||||
(super.noSuchMethod(
|
|
||||||
Invocation.method(
|
|
||||||
#put,
|
|
||||||
[url],
|
|
||||||
{
|
|
||||||
#headers: headers,
|
|
||||||
#body: body,
|
|
||||||
#encoding: encoding,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
returnValue: _i3.Future<_i2.Response>.value(_FakeResponse_0(
|
|
||||||
this,
|
|
||||||
Invocation.method(
|
|
||||||
#put,
|
|
||||||
[url],
|
|
||||||
{
|
|
||||||
#headers: headers,
|
|
||||||
#body: body,
|
|
||||||
#encoding: encoding,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
)),
|
|
||||||
) as _i3.Future<_i2.Response>);
|
|
||||||
@override
|
|
||||||
_i3.Future<_i2.Response> patch(
|
|
||||||
Uri? url, {
|
|
||||||
Map<String, String>? headers,
|
|
||||||
Object? body,
|
|
||||||
_i4.Encoding? encoding,
|
|
||||||
}) =>
|
|
||||||
(super.noSuchMethod(
|
|
||||||
Invocation.method(
|
|
||||||
#patch,
|
|
||||||
[url],
|
|
||||||
{
|
|
||||||
#headers: headers,
|
|
||||||
#body: body,
|
|
||||||
#encoding: encoding,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
returnValue: _i3.Future<_i2.Response>.value(_FakeResponse_0(
|
|
||||||
this,
|
|
||||||
Invocation.method(
|
|
||||||
#patch,
|
|
||||||
[url],
|
|
||||||
{
|
|
||||||
#headers: headers,
|
|
||||||
#body: body,
|
|
||||||
#encoding: encoding,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
)),
|
|
||||||
) as _i3.Future<_i2.Response>);
|
|
||||||
@override
|
|
||||||
_i3.Future<_i2.Response> delete(
|
|
||||||
Uri? url, {
|
|
||||||
Map<String, String>? headers,
|
|
||||||
Object? body,
|
|
||||||
_i4.Encoding? encoding,
|
|
||||||
}) =>
|
|
||||||
(super.noSuchMethod(
|
|
||||||
Invocation.method(
|
|
||||||
#delete,
|
|
||||||
[url],
|
|
||||||
{
|
|
||||||
#headers: headers,
|
|
||||||
#body: body,
|
|
||||||
#encoding: encoding,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
returnValue: _i3.Future<_i2.Response>.value(_FakeResponse_0(
|
|
||||||
this,
|
|
||||||
Invocation.method(
|
|
||||||
#delete,
|
|
||||||
[url],
|
|
||||||
{
|
|
||||||
#headers: headers,
|
|
||||||
#body: body,
|
|
||||||
#encoding: encoding,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
)),
|
|
||||||
) as _i3.Future<_i2.Response>);
|
|
||||||
@override
|
|
||||||
_i3.Future<String> read(
|
|
||||||
Uri? url, {
|
|
||||||
Map<String, String>? headers,
|
|
||||||
}) =>
|
|
||||||
(super.noSuchMethod(
|
|
||||||
Invocation.method(
|
|
||||||
#read,
|
|
||||||
[url],
|
|
||||||
{#headers: headers},
|
|
||||||
),
|
|
||||||
returnValue: _i3.Future<String>.value(''),
|
|
||||||
) as _i3.Future<String>);
|
|
||||||
@override
|
|
||||||
_i3.Future<_i5.Uint8List> readBytes(
|
|
||||||
Uri? url, {
|
|
||||||
Map<String, String>? headers,
|
|
||||||
}) =>
|
|
||||||
(super.noSuchMethod(
|
|
||||||
Invocation.method(
|
|
||||||
#readBytes,
|
|
||||||
[url],
|
|
||||||
{#headers: headers},
|
|
||||||
),
|
|
||||||
returnValue: _i3.Future<_i5.Uint8List>.value(_i5.Uint8List(0)),
|
|
||||||
) as _i3.Future<_i5.Uint8List>);
|
|
||||||
@override
|
|
||||||
_i3.Future<_i2.StreamedResponse> send(_i2.BaseRequest? request) =>
|
|
||||||
(super.noSuchMethod(
|
|
||||||
Invocation.method(
|
|
||||||
#send,
|
|
||||||
[request],
|
|
||||||
),
|
|
||||||
returnValue:
|
|
||||||
_i3.Future<_i2.StreamedResponse>.value(_FakeStreamedResponse_1(
|
|
||||||
this,
|
|
||||||
Invocation.method(
|
|
||||||
#send,
|
|
||||||
[request],
|
|
||||||
),
|
|
||||||
)),
|
|
||||||
) as _i3.Future<_i2.StreamedResponse>);
|
|
||||||
@override
|
|
||||||
void close() => super.noSuchMethod(
|
|
||||||
Invocation.method(
|
|
||||||
#close,
|
|
||||||
[],
|
|
||||||
),
|
|
||||||
returnValueForMissingStub: null,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -244,14 +244,14 @@ class MockPrefs extends _i1.Mock implements _i4.Prefs {
|
||||||
returnValueForMissingStub: null,
|
returnValueForMissingStub: null,
|
||||||
);
|
);
|
||||||
@override
|
@override
|
||||||
bool get torKillswitch => (super.noSuchMethod(
|
bool get torKillSwitch => (super.noSuchMethod(
|
||||||
Invocation.getter(#torKillswitch),
|
Invocation.getter(#torKillSwitch),
|
||||||
returnValue: false,
|
returnValue: false,
|
||||||
) as bool);
|
) as bool);
|
||||||
@override
|
@override
|
||||||
set torKillswitch(bool? torKillswitch) => super.noSuchMethod(
|
set torKillSwitch(bool? torKillswitch) => super.noSuchMethod(
|
||||||
Invocation.setter(
|
Invocation.setter(
|
||||||
#torKillswitch,
|
#torKillSwitch,
|
||||||
torKillswitch,
|
torKillswitch,
|
||||||
),
|
),
|
||||||
returnValueForMissingStub: null,
|
returnValueForMissingStub: null,
|
||||||
|
|
|
@ -3,13 +3,14 @@
|
||||||
// Do not manually edit this file.
|
// Do not manually edit this file.
|
||||||
|
|
||||||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||||
import 'dart:async' as _i5;
|
import 'dart:async' as _i6;
|
||||||
import 'dart:typed_data' as _i6;
|
import 'dart:typed_data' as _i7;
|
||||||
|
|
||||||
import 'package:mockito/mockito.dart' as _i1;
|
import 'package:mockito/mockito.dart' as _i1;
|
||||||
import 'package:stackwallet/db/isar/main_db.dart' as _i2;
|
import 'package:stackwallet/db/isar/main_db.dart' as _i3;
|
||||||
import 'package:stackwallet/models/isar/stack_theme.dart' as _i4;
|
import 'package:stackwallet/models/isar/stack_theme.dart' as _i5;
|
||||||
import 'package:stackwallet/themes/theme_service.dart' as _i3;
|
import 'package:stackwallet/networking/http.dart' as _i2;
|
||||||
|
import 'package:stackwallet/themes/theme_service.dart' as _i4;
|
||||||
|
|
||||||
// ignore_for_file: type=lint
|
// ignore_for_file: type=lint
|
||||||
// ignore_for_file: avoid_redundant_argument_values
|
// ignore_for_file: avoid_redundant_argument_values
|
||||||
|
@ -22,8 +23,18 @@ import 'package:stackwallet/themes/theme_service.dart' as _i3;
|
||||||
// ignore_for_file: camel_case_types
|
// ignore_for_file: camel_case_types
|
||||||
// ignore_for_file: subtype_of_sealed_class
|
// ignore_for_file: subtype_of_sealed_class
|
||||||
|
|
||||||
class _FakeMainDB_0 extends _i1.SmartFake implements _i2.MainDB {
|
class _FakeHTTP_0 extends _i1.SmartFake implements _i2.HTTP {
|
||||||
_FakeMainDB_0(
|
_FakeHTTP_0(
|
||||||
|
Object parent,
|
||||||
|
Invocation parentInvocation,
|
||||||
|
) : super(
|
||||||
|
parent,
|
||||||
|
parentInvocation,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
class _FakeMainDB_1 extends _i1.SmartFake implements _i3.MainDB {
|
||||||
|
_FakeMainDB_1(
|
||||||
Object parent,
|
Object parent,
|
||||||
Invocation parentInvocation,
|
Invocation parentInvocation,
|
||||||
) : super(
|
) : super(
|
||||||
|
@ -35,26 +46,42 @@ class _FakeMainDB_0 extends _i1.SmartFake implements _i2.MainDB {
|
||||||
/// A class which mocks [ThemeService].
|
/// A class which mocks [ThemeService].
|
||||||
///
|
///
|
||||||
/// See the documentation for Mockito's code generation for more information.
|
/// See the documentation for Mockito's code generation for more information.
|
||||||
class MockThemeService extends _i1.Mock implements _i3.ThemeService {
|
class MockThemeService extends _i1.Mock implements _i4.ThemeService {
|
||||||
MockThemeService() {
|
MockThemeService() {
|
||||||
_i1.throwOnMissingStub(this);
|
_i1.throwOnMissingStub(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_i2.MainDB get db => (super.noSuchMethod(
|
_i2.HTTP get client => (super.noSuchMethod(
|
||||||
|
Invocation.getter(#client),
|
||||||
|
returnValue: _FakeHTTP_0(
|
||||||
|
this,
|
||||||
|
Invocation.getter(#client),
|
||||||
|
),
|
||||||
|
) as _i2.HTTP);
|
||||||
|
@override
|
||||||
|
set client(_i2.HTTP? _client) => super.noSuchMethod(
|
||||||
|
Invocation.setter(
|
||||||
|
#client,
|
||||||
|
_client,
|
||||||
|
),
|
||||||
|
returnValueForMissingStub: null,
|
||||||
|
);
|
||||||
|
@override
|
||||||
|
_i3.MainDB get db => (super.noSuchMethod(
|
||||||
Invocation.getter(#db),
|
Invocation.getter(#db),
|
||||||
returnValue: _FakeMainDB_0(
|
returnValue: _FakeMainDB_1(
|
||||||
this,
|
this,
|
||||||
Invocation.getter(#db),
|
Invocation.getter(#db),
|
||||||
),
|
),
|
||||||
) as _i2.MainDB);
|
) as _i3.MainDB);
|
||||||
@override
|
@override
|
||||||
List<_i4.StackTheme> get installedThemes => (super.noSuchMethod(
|
List<_i5.StackTheme> get installedThemes => (super.noSuchMethod(
|
||||||
Invocation.getter(#installedThemes),
|
Invocation.getter(#installedThemes),
|
||||||
returnValue: <_i4.StackTheme>[],
|
returnValue: <_i5.StackTheme>[],
|
||||||
) as List<_i4.StackTheme>);
|
) as List<_i5.StackTheme>);
|
||||||
@override
|
@override
|
||||||
void init(_i2.MainDB? db) => super.noSuchMethod(
|
void init(_i3.MainDB? db) => super.noSuchMethod(
|
||||||
Invocation.method(
|
Invocation.method(
|
||||||
#init,
|
#init,
|
||||||
[db],
|
[db],
|
||||||
|
@ -62,70 +89,70 @@ class MockThemeService extends _i1.Mock implements _i3.ThemeService {
|
||||||
returnValueForMissingStub: null,
|
returnValueForMissingStub: null,
|
||||||
);
|
);
|
||||||
@override
|
@override
|
||||||
_i5.Future<void> install({required _i6.Uint8List? themeArchiveData}) =>
|
_i6.Future<void> install({required _i7.Uint8List? themeArchiveData}) =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
Invocation.method(
|
Invocation.method(
|
||||||
#install,
|
#install,
|
||||||
[],
|
[],
|
||||||
{#themeArchiveData: themeArchiveData},
|
{#themeArchiveData: themeArchiveData},
|
||||||
),
|
),
|
||||||
returnValue: _i5.Future<void>.value(),
|
returnValue: _i6.Future<void>.value(),
|
||||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
returnValueForMissingStub: _i6.Future<void>.value(),
|
||||||
) as _i5.Future<void>);
|
) as _i6.Future<void>);
|
||||||
@override
|
@override
|
||||||
_i5.Future<void> remove({required String? themeId}) => (super.noSuchMethod(
|
_i6.Future<void> remove({required String? themeId}) => (super.noSuchMethod(
|
||||||
Invocation.method(
|
Invocation.method(
|
||||||
#remove,
|
#remove,
|
||||||
[],
|
[],
|
||||||
{#themeId: themeId},
|
{#themeId: themeId},
|
||||||
),
|
),
|
||||||
returnValue: _i5.Future<void>.value(),
|
returnValue: _i6.Future<void>.value(),
|
||||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
returnValueForMissingStub: _i6.Future<void>.value(),
|
||||||
) as _i5.Future<void>);
|
) as _i6.Future<void>);
|
||||||
@override
|
@override
|
||||||
_i5.Future<void> checkDefaultThemesOnStartup() => (super.noSuchMethod(
|
_i6.Future<void> checkDefaultThemesOnStartup() => (super.noSuchMethod(
|
||||||
Invocation.method(
|
Invocation.method(
|
||||||
#checkDefaultThemesOnStartup,
|
#checkDefaultThemesOnStartup,
|
||||||
[],
|
[],
|
||||||
),
|
),
|
||||||
returnValue: _i5.Future<void>.value(),
|
returnValue: _i6.Future<void>.value(),
|
||||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
returnValueForMissingStub: _i6.Future<void>.value(),
|
||||||
) as _i5.Future<void>);
|
) as _i6.Future<void>);
|
||||||
@override
|
@override
|
||||||
_i5.Future<bool> verifyInstalled({required String? themeId}) =>
|
_i6.Future<bool> verifyInstalled({required String? themeId}) =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
Invocation.method(
|
Invocation.method(
|
||||||
#verifyInstalled,
|
#verifyInstalled,
|
||||||
[],
|
[],
|
||||||
{#themeId: themeId},
|
{#themeId: themeId},
|
||||||
),
|
),
|
||||||
returnValue: _i5.Future<bool>.value(false),
|
returnValue: _i6.Future<bool>.value(false),
|
||||||
) as _i5.Future<bool>);
|
) as _i6.Future<bool>);
|
||||||
@override
|
@override
|
||||||
_i5.Future<List<_i3.StackThemeMetaData>> fetchThemes() => (super.noSuchMethod(
|
_i6.Future<List<_i4.StackThemeMetaData>> fetchThemes() => (super.noSuchMethod(
|
||||||
Invocation.method(
|
Invocation.method(
|
||||||
#fetchThemes,
|
#fetchThemes,
|
||||||
[],
|
[],
|
||||||
),
|
),
|
||||||
returnValue: _i5.Future<List<_i3.StackThemeMetaData>>.value(
|
returnValue: _i6.Future<List<_i4.StackThemeMetaData>>.value(
|
||||||
<_i3.StackThemeMetaData>[]),
|
<_i4.StackThemeMetaData>[]),
|
||||||
) as _i5.Future<List<_i3.StackThemeMetaData>>);
|
) as _i6.Future<List<_i4.StackThemeMetaData>>);
|
||||||
@override
|
@override
|
||||||
_i5.Future<_i6.Uint8List> fetchTheme(
|
_i6.Future<_i7.Uint8List> fetchTheme(
|
||||||
{required _i3.StackThemeMetaData? themeMetaData}) =>
|
{required _i4.StackThemeMetaData? themeMetaData}) =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
Invocation.method(
|
Invocation.method(
|
||||||
#fetchTheme,
|
#fetchTheme,
|
||||||
[],
|
[],
|
||||||
{#themeMetaData: themeMetaData},
|
{#themeMetaData: themeMetaData},
|
||||||
),
|
),
|
||||||
returnValue: _i5.Future<_i6.Uint8List>.value(_i6.Uint8List(0)),
|
returnValue: _i6.Future<_i7.Uint8List>.value(_i7.Uint8List(0)),
|
||||||
) as _i5.Future<_i6.Uint8List>);
|
) as _i6.Future<_i7.Uint8List>);
|
||||||
@override
|
@override
|
||||||
_i4.StackTheme? getTheme({required String? themeId}) =>
|
_i5.StackTheme? getTheme({required String? themeId}) =>
|
||||||
(super.noSuchMethod(Invocation.method(
|
(super.noSuchMethod(Invocation.method(
|
||||||
#getTheme,
|
#getTheme,
|
||||||
[],
|
[],
|
||||||
{#themeId: themeId},
|
{#themeId: themeId},
|
||||||
)) as _i4.StackTheme?);
|
)) as _i5.StackTheme?);
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,13 +3,14 @@
|
||||||
// Do not manually edit this file.
|
// Do not manually edit this file.
|
||||||
|
|
||||||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||||
import 'dart:async' as _i5;
|
import 'dart:async' as _i6;
|
||||||
import 'dart:typed_data' as _i6;
|
import 'dart:typed_data' as _i7;
|
||||||
|
|
||||||
import 'package:mockito/mockito.dart' as _i1;
|
import 'package:mockito/mockito.dart' as _i1;
|
||||||
import 'package:stackwallet/db/isar/main_db.dart' as _i2;
|
import 'package:stackwallet/db/isar/main_db.dart' as _i3;
|
||||||
import 'package:stackwallet/models/isar/stack_theme.dart' as _i4;
|
import 'package:stackwallet/models/isar/stack_theme.dart' as _i5;
|
||||||
import 'package:stackwallet/themes/theme_service.dart' as _i3;
|
import 'package:stackwallet/networking/http.dart' as _i2;
|
||||||
|
import 'package:stackwallet/themes/theme_service.dart' as _i4;
|
||||||
|
|
||||||
// ignore_for_file: type=lint
|
// ignore_for_file: type=lint
|
||||||
// ignore_for_file: avoid_redundant_argument_values
|
// ignore_for_file: avoid_redundant_argument_values
|
||||||
|
@ -22,8 +23,18 @@ import 'package:stackwallet/themes/theme_service.dart' as _i3;
|
||||||
// ignore_for_file: camel_case_types
|
// ignore_for_file: camel_case_types
|
||||||
// ignore_for_file: subtype_of_sealed_class
|
// ignore_for_file: subtype_of_sealed_class
|
||||||
|
|
||||||
class _FakeMainDB_0 extends _i1.SmartFake implements _i2.MainDB {
|
class _FakeHTTP_0 extends _i1.SmartFake implements _i2.HTTP {
|
||||||
_FakeMainDB_0(
|
_FakeHTTP_0(
|
||||||
|
Object parent,
|
||||||
|
Invocation parentInvocation,
|
||||||
|
) : super(
|
||||||
|
parent,
|
||||||
|
parentInvocation,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
class _FakeMainDB_1 extends _i1.SmartFake implements _i3.MainDB {
|
||||||
|
_FakeMainDB_1(
|
||||||
Object parent,
|
Object parent,
|
||||||
Invocation parentInvocation,
|
Invocation parentInvocation,
|
||||||
) : super(
|
) : super(
|
||||||
|
@ -35,26 +46,42 @@ class _FakeMainDB_0 extends _i1.SmartFake implements _i2.MainDB {
|
||||||
/// A class which mocks [ThemeService].
|
/// A class which mocks [ThemeService].
|
||||||
///
|
///
|
||||||
/// See the documentation for Mockito's code generation for more information.
|
/// See the documentation for Mockito's code generation for more information.
|
||||||
class MockThemeService extends _i1.Mock implements _i3.ThemeService {
|
class MockThemeService extends _i1.Mock implements _i4.ThemeService {
|
||||||
MockThemeService() {
|
MockThemeService() {
|
||||||
_i1.throwOnMissingStub(this);
|
_i1.throwOnMissingStub(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_i2.MainDB get db => (super.noSuchMethod(
|
_i2.HTTP get client => (super.noSuchMethod(
|
||||||
|
Invocation.getter(#client),
|
||||||
|
returnValue: _FakeHTTP_0(
|
||||||
|
this,
|
||||||
|
Invocation.getter(#client),
|
||||||
|
),
|
||||||
|
) as _i2.HTTP);
|
||||||
|
@override
|
||||||
|
set client(_i2.HTTP? _client) => super.noSuchMethod(
|
||||||
|
Invocation.setter(
|
||||||
|
#client,
|
||||||
|
_client,
|
||||||
|
),
|
||||||
|
returnValueForMissingStub: null,
|
||||||
|
);
|
||||||
|
@override
|
||||||
|
_i3.MainDB get db => (super.noSuchMethod(
|
||||||
Invocation.getter(#db),
|
Invocation.getter(#db),
|
||||||
returnValue: _FakeMainDB_0(
|
returnValue: _FakeMainDB_1(
|
||||||
this,
|
this,
|
||||||
Invocation.getter(#db),
|
Invocation.getter(#db),
|
||||||
),
|
),
|
||||||
) as _i2.MainDB);
|
) as _i3.MainDB);
|
||||||
@override
|
@override
|
||||||
List<_i4.StackTheme> get installedThemes => (super.noSuchMethod(
|
List<_i5.StackTheme> get installedThemes => (super.noSuchMethod(
|
||||||
Invocation.getter(#installedThemes),
|
Invocation.getter(#installedThemes),
|
||||||
returnValue: <_i4.StackTheme>[],
|
returnValue: <_i5.StackTheme>[],
|
||||||
) as List<_i4.StackTheme>);
|
) as List<_i5.StackTheme>);
|
||||||
@override
|
@override
|
||||||
void init(_i2.MainDB? db) => super.noSuchMethod(
|
void init(_i3.MainDB? db) => super.noSuchMethod(
|
||||||
Invocation.method(
|
Invocation.method(
|
||||||
#init,
|
#init,
|
||||||
[db],
|
[db],
|
||||||
|
@ -62,70 +89,70 @@ class MockThemeService extends _i1.Mock implements _i3.ThemeService {
|
||||||
returnValueForMissingStub: null,
|
returnValueForMissingStub: null,
|
||||||
);
|
);
|
||||||
@override
|
@override
|
||||||
_i5.Future<void> install({required _i6.Uint8List? themeArchiveData}) =>
|
_i6.Future<void> install({required _i7.Uint8List? themeArchiveData}) =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
Invocation.method(
|
Invocation.method(
|
||||||
#install,
|
#install,
|
||||||
[],
|
[],
|
||||||
{#themeArchiveData: themeArchiveData},
|
{#themeArchiveData: themeArchiveData},
|
||||||
),
|
),
|
||||||
returnValue: _i5.Future<void>.value(),
|
returnValue: _i6.Future<void>.value(),
|
||||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
returnValueForMissingStub: _i6.Future<void>.value(),
|
||||||
) as _i5.Future<void>);
|
) as _i6.Future<void>);
|
||||||
@override
|
@override
|
||||||
_i5.Future<void> remove({required String? themeId}) => (super.noSuchMethod(
|
_i6.Future<void> remove({required String? themeId}) => (super.noSuchMethod(
|
||||||
Invocation.method(
|
Invocation.method(
|
||||||
#remove,
|
#remove,
|
||||||
[],
|
[],
|
||||||
{#themeId: themeId},
|
{#themeId: themeId},
|
||||||
),
|
),
|
||||||
returnValue: _i5.Future<void>.value(),
|
returnValue: _i6.Future<void>.value(),
|
||||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
returnValueForMissingStub: _i6.Future<void>.value(),
|
||||||
) as _i5.Future<void>);
|
) as _i6.Future<void>);
|
||||||
@override
|
@override
|
||||||
_i5.Future<void> checkDefaultThemesOnStartup() => (super.noSuchMethod(
|
_i6.Future<void> checkDefaultThemesOnStartup() => (super.noSuchMethod(
|
||||||
Invocation.method(
|
Invocation.method(
|
||||||
#checkDefaultThemesOnStartup,
|
#checkDefaultThemesOnStartup,
|
||||||
[],
|
[],
|
||||||
),
|
),
|
||||||
returnValue: _i5.Future<void>.value(),
|
returnValue: _i6.Future<void>.value(),
|
||||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
returnValueForMissingStub: _i6.Future<void>.value(),
|
||||||
) as _i5.Future<void>);
|
) as _i6.Future<void>);
|
||||||
@override
|
@override
|
||||||
_i5.Future<bool> verifyInstalled({required String? themeId}) =>
|
_i6.Future<bool> verifyInstalled({required String? themeId}) =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
Invocation.method(
|
Invocation.method(
|
||||||
#verifyInstalled,
|
#verifyInstalled,
|
||||||
[],
|
[],
|
||||||
{#themeId: themeId},
|
{#themeId: themeId},
|
||||||
),
|
),
|
||||||
returnValue: _i5.Future<bool>.value(false),
|
returnValue: _i6.Future<bool>.value(false),
|
||||||
) as _i5.Future<bool>);
|
) as _i6.Future<bool>);
|
||||||
@override
|
@override
|
||||||
_i5.Future<List<_i3.StackThemeMetaData>> fetchThemes() => (super.noSuchMethod(
|
_i6.Future<List<_i4.StackThemeMetaData>> fetchThemes() => (super.noSuchMethod(
|
||||||
Invocation.method(
|
Invocation.method(
|
||||||
#fetchThemes,
|
#fetchThemes,
|
||||||
[],
|
[],
|
||||||
),
|
),
|
||||||
returnValue: _i5.Future<List<_i3.StackThemeMetaData>>.value(
|
returnValue: _i6.Future<List<_i4.StackThemeMetaData>>.value(
|
||||||
<_i3.StackThemeMetaData>[]),
|
<_i4.StackThemeMetaData>[]),
|
||||||
) as _i5.Future<List<_i3.StackThemeMetaData>>);
|
) as _i6.Future<List<_i4.StackThemeMetaData>>);
|
||||||
@override
|
@override
|
||||||
_i5.Future<_i6.Uint8List> fetchTheme(
|
_i6.Future<_i7.Uint8List> fetchTheme(
|
||||||
{required _i3.StackThemeMetaData? themeMetaData}) =>
|
{required _i4.StackThemeMetaData? themeMetaData}) =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
Invocation.method(
|
Invocation.method(
|
||||||
#fetchTheme,
|
#fetchTheme,
|
||||||
[],
|
[],
|
||||||
{#themeMetaData: themeMetaData},
|
{#themeMetaData: themeMetaData},
|
||||||
),
|
),
|
||||||
returnValue: _i5.Future<_i6.Uint8List>.value(_i6.Uint8List(0)),
|
returnValue: _i6.Future<_i7.Uint8List>.value(_i7.Uint8List(0)),
|
||||||
) as _i5.Future<_i6.Uint8List>);
|
) as _i6.Future<_i7.Uint8List>);
|
||||||
@override
|
@override
|
||||||
_i4.StackTheme? getTheme({required String? themeId}) =>
|
_i5.StackTheme? getTheme({required String? themeId}) =>
|
||||||
(super.noSuchMethod(Invocation.method(
|
(super.noSuchMethod(Invocation.method(
|
||||||
#getTheme,
|
#getTheme,
|
||||||
[],
|
[],
|
||||||
{#themeId: themeId},
|
{#themeId: themeId},
|
||||||
)) as _i4.StackTheme?);
|
)) as _i5.StackTheme?);
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,13 +3,14 @@
|
||||||
// Do not manually edit this file.
|
// Do not manually edit this file.
|
||||||
|
|
||||||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||||
import 'dart:async' as _i5;
|
import 'dart:async' as _i6;
|
||||||
import 'dart:typed_data' as _i6;
|
import 'dart:typed_data' as _i7;
|
||||||
|
|
||||||
import 'package:mockito/mockito.dart' as _i1;
|
import 'package:mockito/mockito.dart' as _i1;
|
||||||
import 'package:stackwallet/db/isar/main_db.dart' as _i2;
|
import 'package:stackwallet/db/isar/main_db.dart' as _i3;
|
||||||
import 'package:stackwallet/models/isar/stack_theme.dart' as _i4;
|
import 'package:stackwallet/models/isar/stack_theme.dart' as _i5;
|
||||||
import 'package:stackwallet/themes/theme_service.dart' as _i3;
|
import 'package:stackwallet/networking/http.dart' as _i2;
|
||||||
|
import 'package:stackwallet/themes/theme_service.dart' as _i4;
|
||||||
|
|
||||||
// ignore_for_file: type=lint
|
// ignore_for_file: type=lint
|
||||||
// ignore_for_file: avoid_redundant_argument_values
|
// ignore_for_file: avoid_redundant_argument_values
|
||||||
|
@ -22,8 +23,18 @@ import 'package:stackwallet/themes/theme_service.dart' as _i3;
|
||||||
// ignore_for_file: camel_case_types
|
// ignore_for_file: camel_case_types
|
||||||
// ignore_for_file: subtype_of_sealed_class
|
// ignore_for_file: subtype_of_sealed_class
|
||||||
|
|
||||||
class _FakeMainDB_0 extends _i1.SmartFake implements _i2.MainDB {
|
class _FakeHTTP_0 extends _i1.SmartFake implements _i2.HTTP {
|
||||||
_FakeMainDB_0(
|
_FakeHTTP_0(
|
||||||
|
Object parent,
|
||||||
|
Invocation parentInvocation,
|
||||||
|
) : super(
|
||||||
|
parent,
|
||||||
|
parentInvocation,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
class _FakeMainDB_1 extends _i1.SmartFake implements _i3.MainDB {
|
||||||
|
_FakeMainDB_1(
|
||||||
Object parent,
|
Object parent,
|
||||||
Invocation parentInvocation,
|
Invocation parentInvocation,
|
||||||
) : super(
|
) : super(
|
||||||
|
@ -35,26 +46,42 @@ class _FakeMainDB_0 extends _i1.SmartFake implements _i2.MainDB {
|
||||||
/// A class which mocks [ThemeService].
|
/// A class which mocks [ThemeService].
|
||||||
///
|
///
|
||||||
/// See the documentation for Mockito's code generation for more information.
|
/// See the documentation for Mockito's code generation for more information.
|
||||||
class MockThemeService extends _i1.Mock implements _i3.ThemeService {
|
class MockThemeService extends _i1.Mock implements _i4.ThemeService {
|
||||||
MockThemeService() {
|
MockThemeService() {
|
||||||
_i1.throwOnMissingStub(this);
|
_i1.throwOnMissingStub(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_i2.MainDB get db => (super.noSuchMethod(
|
_i2.HTTP get client => (super.noSuchMethod(
|
||||||
|
Invocation.getter(#client),
|
||||||
|
returnValue: _FakeHTTP_0(
|
||||||
|
this,
|
||||||
|
Invocation.getter(#client),
|
||||||
|
),
|
||||||
|
) as _i2.HTTP);
|
||||||
|
@override
|
||||||
|
set client(_i2.HTTP? _client) => super.noSuchMethod(
|
||||||
|
Invocation.setter(
|
||||||
|
#client,
|
||||||
|
_client,
|
||||||
|
),
|
||||||
|
returnValueForMissingStub: null,
|
||||||
|
);
|
||||||
|
@override
|
||||||
|
_i3.MainDB get db => (super.noSuchMethod(
|
||||||
Invocation.getter(#db),
|
Invocation.getter(#db),
|
||||||
returnValue: _FakeMainDB_0(
|
returnValue: _FakeMainDB_1(
|
||||||
this,
|
this,
|
||||||
Invocation.getter(#db),
|
Invocation.getter(#db),
|
||||||
),
|
),
|
||||||
) as _i2.MainDB);
|
) as _i3.MainDB);
|
||||||
@override
|
@override
|
||||||
List<_i4.StackTheme> get installedThemes => (super.noSuchMethod(
|
List<_i5.StackTheme> get installedThemes => (super.noSuchMethod(
|
||||||
Invocation.getter(#installedThemes),
|
Invocation.getter(#installedThemes),
|
||||||
returnValue: <_i4.StackTheme>[],
|
returnValue: <_i5.StackTheme>[],
|
||||||
) as List<_i4.StackTheme>);
|
) as List<_i5.StackTheme>);
|
||||||
@override
|
@override
|
||||||
void init(_i2.MainDB? db) => super.noSuchMethod(
|
void init(_i3.MainDB? db) => super.noSuchMethod(
|
||||||
Invocation.method(
|
Invocation.method(
|
||||||
#init,
|
#init,
|
||||||
[db],
|
[db],
|
||||||
|
@ -62,70 +89,70 @@ class MockThemeService extends _i1.Mock implements _i3.ThemeService {
|
||||||
returnValueForMissingStub: null,
|
returnValueForMissingStub: null,
|
||||||
);
|
);
|
||||||
@override
|
@override
|
||||||
_i5.Future<void> install({required _i6.Uint8List? themeArchiveData}) =>
|
_i6.Future<void> install({required _i7.Uint8List? themeArchiveData}) =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
Invocation.method(
|
Invocation.method(
|
||||||
#install,
|
#install,
|
||||||
[],
|
[],
|
||||||
{#themeArchiveData: themeArchiveData},
|
{#themeArchiveData: themeArchiveData},
|
||||||
),
|
),
|
||||||
returnValue: _i5.Future<void>.value(),
|
returnValue: _i6.Future<void>.value(),
|
||||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
returnValueForMissingStub: _i6.Future<void>.value(),
|
||||||
) as _i5.Future<void>);
|
) as _i6.Future<void>);
|
||||||
@override
|
@override
|
||||||
_i5.Future<void> remove({required String? themeId}) => (super.noSuchMethod(
|
_i6.Future<void> remove({required String? themeId}) => (super.noSuchMethod(
|
||||||
Invocation.method(
|
Invocation.method(
|
||||||
#remove,
|
#remove,
|
||||||
[],
|
[],
|
||||||
{#themeId: themeId},
|
{#themeId: themeId},
|
||||||
),
|
),
|
||||||
returnValue: _i5.Future<void>.value(),
|
returnValue: _i6.Future<void>.value(),
|
||||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
returnValueForMissingStub: _i6.Future<void>.value(),
|
||||||
) as _i5.Future<void>);
|
) as _i6.Future<void>);
|
||||||
@override
|
@override
|
||||||
_i5.Future<void> checkDefaultThemesOnStartup() => (super.noSuchMethod(
|
_i6.Future<void> checkDefaultThemesOnStartup() => (super.noSuchMethod(
|
||||||
Invocation.method(
|
Invocation.method(
|
||||||
#checkDefaultThemesOnStartup,
|
#checkDefaultThemesOnStartup,
|
||||||
[],
|
[],
|
||||||
),
|
),
|
||||||
returnValue: _i5.Future<void>.value(),
|
returnValue: _i6.Future<void>.value(),
|
||||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
returnValueForMissingStub: _i6.Future<void>.value(),
|
||||||
) as _i5.Future<void>);
|
) as _i6.Future<void>);
|
||||||
@override
|
@override
|
||||||
_i5.Future<bool> verifyInstalled({required String? themeId}) =>
|
_i6.Future<bool> verifyInstalled({required String? themeId}) =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
Invocation.method(
|
Invocation.method(
|
||||||
#verifyInstalled,
|
#verifyInstalled,
|
||||||
[],
|
[],
|
||||||
{#themeId: themeId},
|
{#themeId: themeId},
|
||||||
),
|
),
|
||||||
returnValue: _i5.Future<bool>.value(false),
|
returnValue: _i6.Future<bool>.value(false),
|
||||||
) as _i5.Future<bool>);
|
) as _i6.Future<bool>);
|
||||||
@override
|
@override
|
||||||
_i5.Future<List<_i3.StackThemeMetaData>> fetchThemes() => (super.noSuchMethod(
|
_i6.Future<List<_i4.StackThemeMetaData>> fetchThemes() => (super.noSuchMethod(
|
||||||
Invocation.method(
|
Invocation.method(
|
||||||
#fetchThemes,
|
#fetchThemes,
|
||||||
[],
|
[],
|
||||||
),
|
),
|
||||||
returnValue: _i5.Future<List<_i3.StackThemeMetaData>>.value(
|
returnValue: _i6.Future<List<_i4.StackThemeMetaData>>.value(
|
||||||
<_i3.StackThemeMetaData>[]),
|
<_i4.StackThemeMetaData>[]),
|
||||||
) as _i5.Future<List<_i3.StackThemeMetaData>>);
|
) as _i6.Future<List<_i4.StackThemeMetaData>>);
|
||||||
@override
|
@override
|
||||||
_i5.Future<_i6.Uint8List> fetchTheme(
|
_i6.Future<_i7.Uint8List> fetchTheme(
|
||||||
{required _i3.StackThemeMetaData? themeMetaData}) =>
|
{required _i4.StackThemeMetaData? themeMetaData}) =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
Invocation.method(
|
Invocation.method(
|
||||||
#fetchTheme,
|
#fetchTheme,
|
||||||
[],
|
[],
|
||||||
{#themeMetaData: themeMetaData},
|
{#themeMetaData: themeMetaData},
|
||||||
),
|
),
|
||||||
returnValue: _i5.Future<_i6.Uint8List>.value(_i6.Uint8List(0)),
|
returnValue: _i6.Future<_i7.Uint8List>.value(_i7.Uint8List(0)),
|
||||||
) as _i5.Future<_i6.Uint8List>);
|
) as _i6.Future<_i7.Uint8List>);
|
||||||
@override
|
@override
|
||||||
_i4.StackTheme? getTheme({required String? themeId}) =>
|
_i5.StackTheme? getTheme({required String? themeId}) =>
|
||||||
(super.noSuchMethod(Invocation.method(
|
(super.noSuchMethod(Invocation.method(
|
||||||
#getTheme,
|
#getTheme,
|
||||||
[],
|
[],
|
||||||
{#themeId: themeId},
|
{#themeId: themeId},
|
||||||
)) as _i4.StackTheme?);
|
)) as _i5.StackTheme?);
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -23,6 +23,7 @@ import 'package:stackwallet/utilities/enums/sync_type_enum.dart' as _i15;
|
||||||
import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart'
|
import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart'
|
||||||
as _i7;
|
as _i7;
|
||||||
import 'package:stackwallet/utilities/prefs.dart' as _i13;
|
import 'package:stackwallet/utilities/prefs.dart' as _i13;
|
||||||
|
import 'package:tor_ffi_plugin/tor_ffi_plugin.dart' as _i20;
|
||||||
import 'package:tuple/tuple.dart' as _i11;
|
import 'package:tuple/tuple.dart' as _i11;
|
||||||
|
|
||||||
// ignore_for_file: type=lint
|
// ignore_for_file: type=lint
|
||||||
|
@ -483,14 +484,14 @@ class MockPrefs extends _i1.Mock implements _i13.Prefs {
|
||||||
returnValueForMissingStub: null,
|
returnValueForMissingStub: null,
|
||||||
);
|
);
|
||||||
@override
|
@override
|
||||||
bool get torKillswitch => (super.noSuchMethod(
|
bool get torKillSwitch => (super.noSuchMethod(
|
||||||
Invocation.getter(#torKillswitch),
|
Invocation.getter(#torKillSwitch),
|
||||||
returnValue: false,
|
returnValue: false,
|
||||||
) as bool);
|
) as bool);
|
||||||
@override
|
@override
|
||||||
set torKillswitch(bool? torKillswitch) => super.noSuchMethod(
|
set torKillSwitch(bool? torKillswitch) => super.noSuchMethod(
|
||||||
Invocation.setter(
|
Invocation.setter(
|
||||||
#torKillswitch,
|
#torKillSwitch,
|
||||||
torKillswitch,
|
torKillswitch,
|
||||||
),
|
),
|
||||||
returnValueForMissingStub: null,
|
returnValueForMissingStub: null,
|
||||||
|
@ -1040,6 +1041,15 @@ class MockTorService extends _i1.Mock implements _i19.TorService {
|
||||||
),
|
),
|
||||||
) as ({_i8.InternetAddress host, int port}));
|
) as ({_i8.InternetAddress host, int port}));
|
||||||
@override
|
@override
|
||||||
|
void init({_i20.Tor? mockableOverride}) => super.noSuchMethod(
|
||||||
|
Invocation.method(
|
||||||
|
#init,
|
||||||
|
[],
|
||||||
|
{#mockableOverride: mockableOverride},
|
||||||
|
),
|
||||||
|
returnValueForMissingStub: null,
|
||||||
|
);
|
||||||
|
@override
|
||||||
_i12.Future<void> start() => (super.noSuchMethod(
|
_i12.Future<void> start() => (super.noSuchMethod(
|
||||||
Invocation.method(
|
Invocation.method(
|
||||||
#start,
|
#start,
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -3,13 +3,14 @@
|
||||||
// Do not manually edit this file.
|
// Do not manually edit this file.
|
||||||
|
|
||||||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||||
import 'dart:async' as _i5;
|
import 'dart:async' as _i6;
|
||||||
import 'dart:typed_data' as _i6;
|
import 'dart:typed_data' as _i7;
|
||||||
|
|
||||||
import 'package:mockito/mockito.dart' as _i1;
|
import 'package:mockito/mockito.dart' as _i1;
|
||||||
import 'package:stackwallet/db/isar/main_db.dart' as _i2;
|
import 'package:stackwallet/db/isar/main_db.dart' as _i3;
|
||||||
import 'package:stackwallet/models/isar/stack_theme.dart' as _i4;
|
import 'package:stackwallet/models/isar/stack_theme.dart' as _i5;
|
||||||
import 'package:stackwallet/themes/theme_service.dart' as _i3;
|
import 'package:stackwallet/networking/http.dart' as _i2;
|
||||||
|
import 'package:stackwallet/themes/theme_service.dart' as _i4;
|
||||||
|
|
||||||
// ignore_for_file: type=lint
|
// ignore_for_file: type=lint
|
||||||
// ignore_for_file: avoid_redundant_argument_values
|
// ignore_for_file: avoid_redundant_argument_values
|
||||||
|
@ -22,8 +23,18 @@ import 'package:stackwallet/themes/theme_service.dart' as _i3;
|
||||||
// ignore_for_file: camel_case_types
|
// ignore_for_file: camel_case_types
|
||||||
// ignore_for_file: subtype_of_sealed_class
|
// ignore_for_file: subtype_of_sealed_class
|
||||||
|
|
||||||
class _FakeMainDB_0 extends _i1.SmartFake implements _i2.MainDB {
|
class _FakeHTTP_0 extends _i1.SmartFake implements _i2.HTTP {
|
||||||
_FakeMainDB_0(
|
_FakeHTTP_0(
|
||||||
|
Object parent,
|
||||||
|
Invocation parentInvocation,
|
||||||
|
) : super(
|
||||||
|
parent,
|
||||||
|
parentInvocation,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
class _FakeMainDB_1 extends _i1.SmartFake implements _i3.MainDB {
|
||||||
|
_FakeMainDB_1(
|
||||||
Object parent,
|
Object parent,
|
||||||
Invocation parentInvocation,
|
Invocation parentInvocation,
|
||||||
) : super(
|
) : super(
|
||||||
|
@ -35,26 +46,42 @@ class _FakeMainDB_0 extends _i1.SmartFake implements _i2.MainDB {
|
||||||
/// A class which mocks [ThemeService].
|
/// A class which mocks [ThemeService].
|
||||||
///
|
///
|
||||||
/// See the documentation for Mockito's code generation for more information.
|
/// See the documentation for Mockito's code generation for more information.
|
||||||
class MockThemeService extends _i1.Mock implements _i3.ThemeService {
|
class MockThemeService extends _i1.Mock implements _i4.ThemeService {
|
||||||
MockThemeService() {
|
MockThemeService() {
|
||||||
_i1.throwOnMissingStub(this);
|
_i1.throwOnMissingStub(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_i2.MainDB get db => (super.noSuchMethod(
|
_i2.HTTP get client => (super.noSuchMethod(
|
||||||
|
Invocation.getter(#client),
|
||||||
|
returnValue: _FakeHTTP_0(
|
||||||
|
this,
|
||||||
|
Invocation.getter(#client),
|
||||||
|
),
|
||||||
|
) as _i2.HTTP);
|
||||||
|
@override
|
||||||
|
set client(_i2.HTTP? _client) => super.noSuchMethod(
|
||||||
|
Invocation.setter(
|
||||||
|
#client,
|
||||||
|
_client,
|
||||||
|
),
|
||||||
|
returnValueForMissingStub: null,
|
||||||
|
);
|
||||||
|
@override
|
||||||
|
_i3.MainDB get db => (super.noSuchMethod(
|
||||||
Invocation.getter(#db),
|
Invocation.getter(#db),
|
||||||
returnValue: _FakeMainDB_0(
|
returnValue: _FakeMainDB_1(
|
||||||
this,
|
this,
|
||||||
Invocation.getter(#db),
|
Invocation.getter(#db),
|
||||||
),
|
),
|
||||||
) as _i2.MainDB);
|
) as _i3.MainDB);
|
||||||
@override
|
@override
|
||||||
List<_i4.StackTheme> get installedThemes => (super.noSuchMethod(
|
List<_i5.StackTheme> get installedThemes => (super.noSuchMethod(
|
||||||
Invocation.getter(#installedThemes),
|
Invocation.getter(#installedThemes),
|
||||||
returnValue: <_i4.StackTheme>[],
|
returnValue: <_i5.StackTheme>[],
|
||||||
) as List<_i4.StackTheme>);
|
) as List<_i5.StackTheme>);
|
||||||
@override
|
@override
|
||||||
void init(_i2.MainDB? db) => super.noSuchMethod(
|
void init(_i3.MainDB? db) => super.noSuchMethod(
|
||||||
Invocation.method(
|
Invocation.method(
|
||||||
#init,
|
#init,
|
||||||
[db],
|
[db],
|
||||||
|
@ -62,78 +89,78 @@ class MockThemeService extends _i1.Mock implements _i3.ThemeService {
|
||||||
returnValueForMissingStub: null,
|
returnValueForMissingStub: null,
|
||||||
);
|
);
|
||||||
@override
|
@override
|
||||||
_i5.Future<void> install({required _i6.Uint8List? themeArchiveData}) =>
|
_i6.Future<void> install({required _i7.Uint8List? themeArchiveData}) =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
Invocation.method(
|
Invocation.method(
|
||||||
#install,
|
#install,
|
||||||
[],
|
[],
|
||||||
{#themeArchiveData: themeArchiveData},
|
{#themeArchiveData: themeArchiveData},
|
||||||
),
|
),
|
||||||
returnValue: _i5.Future<void>.value(),
|
returnValue: _i6.Future<void>.value(),
|
||||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
returnValueForMissingStub: _i6.Future<void>.value(),
|
||||||
) as _i5.Future<void>);
|
) as _i6.Future<void>);
|
||||||
@override
|
@override
|
||||||
_i5.Future<void> remove({required String? themeId}) => (super.noSuchMethod(
|
_i6.Future<void> remove({required String? themeId}) => (super.noSuchMethod(
|
||||||
Invocation.method(
|
Invocation.method(
|
||||||
#remove,
|
#remove,
|
||||||
[],
|
[],
|
||||||
{#themeId: themeId},
|
{#themeId: themeId},
|
||||||
),
|
),
|
||||||
returnValue: _i5.Future<void>.value(),
|
returnValue: _i6.Future<void>.value(),
|
||||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
returnValueForMissingStub: _i6.Future<void>.value(),
|
||||||
) as _i5.Future<void>);
|
) as _i6.Future<void>);
|
||||||
@override
|
@override
|
||||||
_i5.Future<void> checkDefaultThemesOnStartup() => (super.noSuchMethod(
|
_i6.Future<void> checkDefaultThemesOnStartup() => (super.noSuchMethod(
|
||||||
Invocation.method(
|
Invocation.method(
|
||||||
#checkDefaultThemesOnStartup,
|
#checkDefaultThemesOnStartup,
|
||||||
[],
|
[],
|
||||||
),
|
),
|
||||||
returnValue: _i5.Future<void>.value(),
|
returnValue: _i6.Future<void>.value(),
|
||||||
returnValueForMissingStub: _i5.Future<void>.value(),
|
returnValueForMissingStub: _i6.Future<void>.value(),
|
||||||
) as _i5.Future<void>);
|
) as _i6.Future<void>);
|
||||||
@override
|
@override
|
||||||
_i5.Future<bool> verifyInstalled({required String? themeId}) =>
|
_i6.Future<bool> verifyInstalled({required String? themeId}) =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
Invocation.method(
|
Invocation.method(
|
||||||
#verifyInstalled,
|
#verifyInstalled,
|
||||||
[],
|
[],
|
||||||
{#themeId: themeId},
|
{#themeId: themeId},
|
||||||
),
|
),
|
||||||
returnValue: _i5.Future<bool>.value(false),
|
returnValue: _i6.Future<bool>.value(false),
|
||||||
) as _i5.Future<bool>);
|
) as _i6.Future<bool>);
|
||||||
@override
|
@override
|
||||||
_i5.Future<List<_i3.StackThemeMetaData>> fetchThemes() => (super.noSuchMethod(
|
_i6.Future<List<_i4.StackThemeMetaData>> fetchThemes() => (super.noSuchMethod(
|
||||||
Invocation.method(
|
Invocation.method(
|
||||||
#fetchThemes,
|
#fetchThemes,
|
||||||
[],
|
[],
|
||||||
),
|
),
|
||||||
returnValue: _i5.Future<List<_i3.StackThemeMetaData>>.value(
|
returnValue: _i6.Future<List<_i4.StackThemeMetaData>>.value(
|
||||||
<_i3.StackThemeMetaData>[]),
|
<_i4.StackThemeMetaData>[]),
|
||||||
) as _i5.Future<List<_i3.StackThemeMetaData>>);
|
) as _i6.Future<List<_i4.StackThemeMetaData>>);
|
||||||
@override
|
@override
|
||||||
_i5.Future<_i6.Uint8List> fetchTheme(
|
_i6.Future<_i7.Uint8List> fetchTheme(
|
||||||
{required _i3.StackThemeMetaData? themeMetaData}) =>
|
{required _i4.StackThemeMetaData? themeMetaData}) =>
|
||||||
(super.noSuchMethod(
|
(super.noSuchMethod(
|
||||||
Invocation.method(
|
Invocation.method(
|
||||||
#fetchTheme,
|
#fetchTheme,
|
||||||
[],
|
[],
|
||||||
{#themeMetaData: themeMetaData},
|
{#themeMetaData: themeMetaData},
|
||||||
),
|
),
|
||||||
returnValue: _i5.Future<_i6.Uint8List>.value(_i6.Uint8List(0)),
|
returnValue: _i6.Future<_i7.Uint8List>.value(_i7.Uint8List(0)),
|
||||||
) as _i5.Future<_i6.Uint8List>);
|
) as _i6.Future<_i7.Uint8List>);
|
||||||
@override
|
@override
|
||||||
_i4.StackTheme? getTheme({required String? themeId}) =>
|
_i5.StackTheme? getTheme({required String? themeId}) =>
|
||||||
(super.noSuchMethod(Invocation.method(
|
(super.noSuchMethod(Invocation.method(
|
||||||
#getTheme,
|
#getTheme,
|
||||||
[],
|
[],
|
||||||
{#themeId: themeId},
|
{#themeId: themeId},
|
||||||
)) as _i4.StackTheme?);
|
)) as _i5.StackTheme?);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A class which mocks [IThemeAssets].
|
/// A class which mocks [IThemeAssets].
|
||||||
///
|
///
|
||||||
/// See the documentation for Mockito's code generation for more information.
|
/// See the documentation for Mockito's code generation for more information.
|
||||||
class MockIThemeAssets extends _i1.Mock implements _i4.IThemeAssets {
|
class MockIThemeAssets extends _i1.Mock implements _i5.IThemeAssets {
|
||||||
MockIThemeAssets() {
|
MockIThemeAssets() {
|
||||||
_i1.throwOnMissingStub(this);
|
_i1.throwOnMissingStub(this);
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue