mirror of
https://github.com/pese-git/cherrypick.git
synced 2026-01-24 05:25:19 +00:00
fix(tests): update expected outputs in generator tests to match new formatting
This commit is contained in:
@@ -245,7 +245,10 @@ void main() {
|
|||||||
expect(
|
expect(
|
||||||
result,
|
result,
|
||||||
equals(
|
equals(
|
||||||
" bind<ApiClient>().toProvideAsync(() => createApiClient()).withName('mainApi').singleton();"));
|
" bind<ApiClient>()\n"
|
||||||
|
" .toProvideAsync(() => createApiClient())\n"
|
||||||
|
" .withName('mainApi')\n"
|
||||||
|
" .singleton();"));
|
||||||
});
|
});
|
||||||
|
|
||||||
test('should handle different indentation', () {
|
test('should handle different indentation', () {
|
||||||
|
|||||||
@@ -202,9 +202,8 @@ part of 'test_widget.dart';
|
|||||||
|
|
||||||
mixin _\$TestWidget {
|
mixin _\$TestWidget {
|
||||||
void _inject(TestWidget instance) {
|
void _inject(TestWidget instance) {
|
||||||
instance.service = CherryPick.openScope(
|
instance.service =
|
||||||
scopeName: 'userScope',
|
CherryPick.openScope(scopeName: 'userScope').resolve<MyService>();
|
||||||
).resolve<MyService>();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
''';
|
''';
|
||||||
@@ -407,9 +406,10 @@ mixin _\$TestWidget {
|
|||||||
instance.cacheService = CherryPick.openRootScope().tryResolve<CacheService>(
|
instance.cacheService = CherryPick.openRootScope().tryResolve<CacheService>(
|
||||||
named: 'cache',
|
named: 'cache',
|
||||||
);
|
);
|
||||||
instance.dbService = CherryPick.openScope(
|
instance.dbService =
|
||||||
scopeName: 'dbScope',
|
CherryPick.openScope(
|
||||||
).resolveAsync<DatabaseService>();
|
scopeName: 'dbScope',
|
||||||
|
).resolveAsync<DatabaseService>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
''';
|
''';
|
||||||
@@ -451,10 +451,10 @@ part of 'test_widget.dart';
|
|||||||
mixin _\$TestWidget {
|
mixin _\$TestWidget {
|
||||||
void _inject(TestWidget instance) {
|
void _inject(TestWidget instance) {
|
||||||
instance.stringList = CherryPick.openRootScope().resolve<List<String>>();
|
instance.stringList = CherryPick.openRootScope().resolve<List<String>>();
|
||||||
instance.stringIntMap = CherryPick.openRootScope()
|
instance.stringIntMap =
|
||||||
.resolve<Map<String, int>>();
|
CherryPick.openRootScope().resolve<Map<String, int>>();
|
||||||
instance.futureStringList = CherryPick.openRootScope()
|
instance.futureStringList =
|
||||||
.resolveAsync<List<String>>();
|
CherryPick.openRootScope().resolveAsync<List<String>>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
''';
|
''';
|
||||||
|
|||||||
Reference in New Issue
Block a user