diff --git a/brick/__brick__/{{#snakeCase}}{{project_name}}{{/snakeCase}}/test/{{#snakeCase}}{{project_name}}{{/snakeCase}}_test.dart b/brick/__brick__/{{#snakeCase}}{{project_name}}{{/snakeCase}}/test/{{#snakeCase}}{{project_name}}{{/snakeCase}}_test.dart index 2e22106..8dbc560 100644 --- a/brick/__brick__/{{#snakeCase}}{{project_name}}{{/snakeCase}}/test/{{#snakeCase}}{{project_name}}{{/snakeCase}}_test.dart +++ b/brick/__brick__/{{#snakeCase}}{{project_name}}{{/snakeCase}}/test/{{#snakeCase}}{{project_name}}{{/snakeCase}}_test.dart @@ -19,11 +19,11 @@ void main() { TestWidgetsFlutterBinding.ensureInitialized(); group('{{#pascalCase}}{{project_name}}{{/pascalCase}}', () { - late {{#pascalCase}}{{project_name}}{{/pascalCase}}Platform myPluginPlatform; + late {{#pascalCase}}{{project_name}}{{/pascalCase}}Platform {{#camelCase}}{{project_name}}{{/camelCase}}Platform; setUp(() { - myPluginPlatform = Mock{{#pascalCase}}{{project_name}}{{/pascalCase}}Platform(); - {{#pascalCase}}{{project_name}}{{/pascalCase}}Platform.instance = myPluginPlatform; + {{#camelCase}}{{project_name}}{{/camelCase}}Platform = Mock{{#pascalCase}}{{project_name}}{{/pascalCase}}Platform(); + {{#pascalCase}}{{project_name}}{{/pascalCase}}Platform.instance = {{#camelCase}}{{project_name}}{{/camelCase}}Platform; }); group('getPlatformName', () { @@ -31,7 +31,7 @@ void main() { () async { const platformName = '__test_platform__'; when( - () => myPluginPlatform.getPlatformName(), + () => {{#camelCase}}{{project_name}}{{/camelCase}}Platform.getPlatformName(), ).thenAnswer((_) async => platformName); final actualPlatformName = await getPlatformName(); @@ -41,7 +41,7 @@ void main() { test('throws exception when platform implementation is missing', () async { when( - () => myPluginPlatform.getPlatformName(), + () => {{#camelCase}}{{project_name}}{{/camelCase}}Platform.getPlatformName(), ).thenAnswer((_) async => null); expect(getPlatformName, throwsException); diff --git a/brick/__brick__/{{#snakeCase}}{{project_name}}{{/snakeCase}}_android/test/{{#snakeCase}}{{project_name}}{{/snakeCase}}_android_test.dart b/brick/__brick__/{{#snakeCase}}{{project_name}}{{/snakeCase}}_android/test/{{#snakeCase}}{{project_name}}{{/snakeCase}}_android_test.dart index bae5cba..a85b30a 100644 --- a/brick/__brick__/{{#snakeCase}}{{project_name}}{{/snakeCase}}_android/test/{{#snakeCase}}{{project_name}}{{/snakeCase}}_android_test.dart +++ b/brick/__brick__/{{#snakeCase}}{{project_name}}{{/snakeCase}}_android/test/{{#snakeCase}}{{project_name}}{{/snakeCase}}_android_test.dart @@ -15,15 +15,15 @@ void main() { group('{{#pascalCase}}{{project_name}}{{/pascalCase}}Android', () { const kPlatformName = 'Android'; - late {{#pascalCase}}{{project_name}}{{/pascalCase}}Android myPlugin; + late {{#pascalCase}}{{project_name}}{{/pascalCase}}Android {{#camelCase}}{{project_name}}{{/camelCase}}; late List log; setUp(() async { - myPlugin = {{#pascalCase}}{{project_name}}{{/pascalCase}}Android(); + {{#camelCase}}{{project_name}}{{/camelCase}} = {{#pascalCase}}{{project_name}}{{/pascalCase}}Android(); log = []; TestDefaultBinaryMessengerBinding.instance!.defaultBinaryMessenger - .setMockMethodCallHandler(myPlugin.methodChannel, (methodCall) async { + .setMockMethodCallHandler({{#camelCase}}{{project_name}}{{/camelCase}}.methodChannel, (methodCall) async { log.add(methodCall); switch (methodCall.method) { case 'getPlatformName': @@ -40,7 +40,7 @@ void main() { }); test('getPlatformName returns correct name', () async { - final name = await myPlugin.getPlatformName(); + final name = await {{#camelCase}}{{project_name}}{{/camelCase}}.getPlatformName(); expect( log, [isMethodCall('getPlatformName', arguments: null)], diff --git a/brick/__brick__/{{#snakeCase}}{{project_name}}{{/snakeCase}}_ios/test/{{#snakeCase}}{{project_name}}{{/snakeCase}}_ios_test.dart b/brick/__brick__/{{#snakeCase}}{{project_name}}{{/snakeCase}}_ios/test/{{#snakeCase}}{{project_name}}{{/snakeCase}}_ios_test.dart index 515d731..66bdc99 100644 --- a/brick/__brick__/{{#snakeCase}}{{project_name}}{{/snakeCase}}_ios/test/{{#snakeCase}}{{project_name}}{{/snakeCase}}_ios_test.dart +++ b/brick/__brick__/{{#snakeCase}}{{project_name}}{{/snakeCase}}_ios/test/{{#snakeCase}}{{project_name}}{{/snakeCase}}_ios_test.dart @@ -15,15 +15,15 @@ void main() { group('{{#pascalCase}}{{project_name}}{{/pascalCase}}IOS', () { const kPlatformName = 'iOS'; - late {{#pascalCase}}{{project_name}}{{/pascalCase}}IOS myPlugin; + late {{#pascalCase}}{{project_name}}{{/pascalCase}}IOS {{#camelCase}}{{project_name}}{{/camelCase}}; late List log; setUp(() async { - myPlugin = {{#pascalCase}}{{project_name}}{{/pascalCase}}IOS(); + {{#camelCase}}{{project_name}}{{/camelCase}} = {{#pascalCase}}{{project_name}}{{/pascalCase}}IOS(); log = []; TestDefaultBinaryMessengerBinding.instance!.defaultBinaryMessenger - .setMockMethodCallHandler(myPlugin.methodChannel, (methodCall) async { + .setMockMethodCallHandler({{#camelCase}}{{project_name}}{{/camelCase}}.methodChannel, (methodCall) async { log.add(methodCall); switch (methodCall.method) { case 'getPlatformName': @@ -40,7 +40,7 @@ void main() { }); test('getPlatformName returns correct name', () async { - final name = await myPlugin.getPlatformName(); + final name = await {{#camelCase}}{{project_name}}{{/camelCase}}.getPlatformName(); expect( log, [isMethodCall('getPlatformName', arguments: null)], diff --git a/brick/__brick__/{{#snakeCase}}{{project_name}}{{/snakeCase}}_linux/test/{{#snakeCase}}{{project_name}}{{/snakeCase}}_linux_test.dart b/brick/__brick__/{{#snakeCase}}{{project_name}}{{/snakeCase}}_linux/test/{{#snakeCase}}{{project_name}}{{/snakeCase}}_linux_test.dart index bbfe677..fac3b9c 100644 --- a/brick/__brick__/{{#snakeCase}}{{project_name}}{{/snakeCase}}_linux/test/{{#snakeCase}}{{project_name}}{{/snakeCase}}_linux_test.dart +++ b/brick/__brick__/{{#snakeCase}}{{project_name}}{{/snakeCase}}_linux/test/{{#snakeCase}}{{project_name}}{{/snakeCase}}_linux_test.dart @@ -15,15 +15,15 @@ void main() { group('{{#pascalCase}}{{project_name}}{{/pascalCase}}Linux', () { const kPlatformName = 'Linux'; - late {{#pascalCase}}{{project_name}}{{/pascalCase}}Linux myPlugin; + late {{#pascalCase}}{{project_name}}{{/pascalCase}}Linux {{#camelCase}}{{project_name}}{{/camelCase}}; late List log; setUp(() async { - myPlugin = {{#pascalCase}}{{project_name}}{{/pascalCase}}Linux(); + {{#camelCase}}{{project_name}}{{/camelCase}} = {{#pascalCase}}{{project_name}}{{/pascalCase}}Linux(); log = []; TestDefaultBinaryMessengerBinding.instance!.defaultBinaryMessenger - .setMockMethodCallHandler(myPlugin.methodChannel, (methodCall) async { + .setMockMethodCallHandler({{#camelCase}}{{project_name}}{{/camelCase}}.methodChannel, (methodCall) async { log.add(methodCall); switch (methodCall.method) { case 'getPlatformName': @@ -40,7 +40,7 @@ void main() { }); test('getPlatformName returns correct name', () async { - final name = await myPlugin.getPlatformName(); + final name = await {{#camelCase}}{{project_name}}{{/camelCase}}.getPlatformName(); expect( log, [isMethodCall('getPlatformName', arguments: null)], diff --git a/brick/__brick__/{{#snakeCase}}{{project_name}}{{/snakeCase}}_macos/test/{{#snakeCase}}{{project_name}}{{/snakeCase}}_macos_test.dart b/brick/__brick__/{{#snakeCase}}{{project_name}}{{/snakeCase}}_macos/test/{{#snakeCase}}{{project_name}}{{/snakeCase}}_macos_test.dart index 25b95a5..36952d3 100644 --- a/brick/__brick__/{{#snakeCase}}{{project_name}}{{/snakeCase}}_macos/test/{{#snakeCase}}{{project_name}}{{/snakeCase}}_macos_test.dart +++ b/brick/__brick__/{{#snakeCase}}{{project_name}}{{/snakeCase}}_macos/test/{{#snakeCase}}{{project_name}}{{/snakeCase}}_macos_test.dart @@ -15,15 +15,15 @@ void main() { group('{{#pascalCase}}{{project_name}}{{/pascalCase}}MacOS', () { const kPlatformName = 'MacOS'; - late {{#pascalCase}}{{project_name}}{{/pascalCase}}MacOS myPlugin; + late {{#pascalCase}}{{project_name}}{{/pascalCase}}MacOS {{#camelCase}}{{project_name}}{{/camelCase}}; late List log; setUp(() async { - myPlugin = {{#pascalCase}}{{project_name}}{{/pascalCase}}MacOS(); + {{#camelCase}}{{project_name}}{{/camelCase}} = {{#pascalCase}}{{project_name}}{{/pascalCase}}MacOS(); log = []; TestDefaultBinaryMessengerBinding.instance!.defaultBinaryMessenger - .setMockMethodCallHandler(myPlugin.methodChannel, (methodCall) async { + .setMockMethodCallHandler({{#camelCase}}{{project_name}}{{/camelCase}}.methodChannel, (methodCall) async { log.add(methodCall); switch (methodCall.method) { case 'getPlatformName': @@ -40,7 +40,7 @@ void main() { }); test('getPlatformName returns correct name', () async { - final name = await myPlugin.getPlatformName(); + final name = await {{#camelCase}}{{project_name}}{{/camelCase}}.getPlatformName(); expect( log, [isMethodCall('getPlatformName', arguments: null)], diff --git a/brick/__brick__/{{#snakeCase}}{{project_name}}{{/snakeCase}}_platform_interface/test/{{#snakeCase}}{{project_name}}{{/snakeCase}}_platform_interface_test.dart b/brick/__brick__/{{#snakeCase}}{{project_name}}{{/snakeCase}}_platform_interface/test/{{#snakeCase}}{{project_name}}{{/snakeCase}}_platform_interface_test.dart index 6799680..4002325 100644 --- a/brick/__brick__/{{#snakeCase}}{{project_name}}{{/snakeCase}}_platform_interface/test/{{#snakeCase}}{{project_name}}{{/snakeCase}}_platform_interface_test.dart +++ b/brick/__brick__/{{#snakeCase}}{{project_name}}{{/snakeCase}}_platform_interface/test/{{#snakeCase}}{{project_name}}{{/snakeCase}}_platform_interface_test.dart @@ -18,11 +18,11 @@ class {{#pascalCase}}{{project_name}}{{/pascalCase}}Mock extends {{#pascalCase}} void main() { TestWidgetsFlutterBinding.ensureInitialized(); group('{{#pascalCase}}{{project_name}}{{/pascalCase}}PlatformInterface', () { - late {{#pascalCase}}{{project_name}}{{/pascalCase}}Platform myPluginPlatform; + late {{#pascalCase}}{{project_name}}{{/pascalCase}}Platform {{#camelCase}}{{project_name}}{{/camelCase}}Platform; setUp(() { - myPluginPlatform = {{#pascalCase}}{{project_name}}{{/pascalCase}}Mock(); - {{#pascalCase}}{{project_name}}{{/pascalCase}}Platform.instance = myPluginPlatform; + {{#camelCase}}{{project_name}}{{/camelCase}}Platform = {{#pascalCase}}{{project_name}}{{/pascalCase}}Mock(); + {{#pascalCase}}{{project_name}}{{/pascalCase}}Platform.instance = {{#camelCase}}{{project_name}}{{/camelCase}}Platform; }); group('getPlatformName', () { diff --git a/brick/__brick__/{{#snakeCase}}{{project_name}}{{/snakeCase}}_web/test/{{#snakeCase}}{{project_name}}{{/snakeCase}}_web_test.dart b/brick/__brick__/{{#snakeCase}}{{project_name}}{{/snakeCase}}_web/test/{{#snakeCase}}{{project_name}}{{/snakeCase}}_web_test.dart index cc2e356..3da9844 100644 --- a/brick/__brick__/{{#snakeCase}}{{project_name}}{{/snakeCase}}_web/test/{{#snakeCase}}{{project_name}}{{/snakeCase}}_web_test.dart +++ b/brick/__brick__/{{#snakeCase}}{{project_name}}{{/snakeCase}}_web/test/{{#snakeCase}}{{project_name}}{{/snakeCase}}_web_test.dart @@ -14,10 +14,10 @@ void main() { group('{{#pascalCase}}{{project_name}}{{/pascalCase}}Web', () { const kPlatformName = 'Web'; - late {{#pascalCase}}{{project_name}}{{/pascalCase}}Web myPlugin; + late {{#pascalCase}}{{project_name}}{{/pascalCase}}Web {{#camelCase}}{{project_name}}{{/camelCase}}; setUp(() async { - myPlugin = {{#pascalCase}}{{project_name}}{{/pascalCase}}Web(); + {{#camelCase}}{{project_name}}{{/camelCase}} = {{#pascalCase}}{{project_name}}{{/pascalCase}}Web(); }); test('can be registered', () { @@ -26,7 +26,7 @@ void main() { }); test('getPlatformName returns correct name', () async { - final name = await myPlugin.getPlatformName(); + final name = await {{#camelCase}}{{project_name}}{{/camelCase}}.getPlatformName(); expect(name, equals(kPlatformName)); }); }); diff --git a/brick/__brick__/{{#snakeCase}}{{project_name}}{{/snakeCase}}_windows/test/{{#snakeCase}}{{project_name}}{{/snakeCase}}_windows_test.dart b/brick/__brick__/{{#snakeCase}}{{project_name}}{{/snakeCase}}_windows/test/{{#snakeCase}}{{project_name}}{{/snakeCase}}_windows_test.dart index 3a81fc6..5f03f69 100644 --- a/brick/__brick__/{{#snakeCase}}{{project_name}}{{/snakeCase}}_windows/test/{{#snakeCase}}{{project_name}}{{/snakeCase}}_windows_test.dart +++ b/brick/__brick__/{{#snakeCase}}{{project_name}}{{/snakeCase}}_windows/test/{{#snakeCase}}{{project_name}}{{/snakeCase}}_windows_test.dart @@ -15,15 +15,15 @@ void main() { group('{{#pascalCase}}{{project_name}}{{/pascalCase}}Windows', () { const kPlatformName = 'Windows'; - late {{#pascalCase}}{{project_name}}{{/pascalCase}}Windows myPlugin; + late {{#pascalCase}}{{project_name}}{{/pascalCase}}Windows {{#camelCase}}{{project_name}}{{/camelCase}}; late List log; setUp(() async { - myPlugin = {{#pascalCase}}{{project_name}}{{/pascalCase}}Windows(); + {{#camelCase}}{{project_name}}{{/camelCase}} = {{#pascalCase}}{{project_name}}{{/pascalCase}}Windows(); log = []; TestDefaultBinaryMessengerBinding.instance!.defaultBinaryMessenger - .setMockMethodCallHandler(myPlugin.methodChannel, (methodCall) async { + .setMockMethodCallHandler({{#camelCase}}{{project_name}}{{/camelCase}}.methodChannel, (methodCall) async { log.add(methodCall); switch (methodCall.method) { case 'getPlatformName': @@ -40,7 +40,7 @@ void main() { }); test('getPlatformName returns correct name', () async { - final name = await myPlugin.getPlatformName(); + final name = await {{#camelCase}}{{project_name}}{{/camelCase}}.getPlatformName(); expect( log, [isMethodCall('getPlatformName', arguments: null)],