From 71baab0814542c8a4f4debf00729cb5d2793c5d2 Mon Sep 17 00:00:00 2001 From: xavierchanth Date: Wed, 15 Nov 2023 14:46:04 -0500 Subject: [PATCH] chore: better names for test objects --- .../test/sshnp/sshnp_core_mocks.dart | 24 +++++++++---------- .../test/sshnp/sshnp_core_test.dart | 6 ++--- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/packages/noports_core/test/sshnp/sshnp_core_mocks.dart b/packages/noports_core/test/sshnp/sshnp_core_mocks.dart index c9b9a211c..9d5bea166 100644 --- a/packages/noports_core/test/sshnp/sshnp_core_mocks.dart +++ b/packages/noports_core/test/sshnp/sshnp_core_mocks.dart @@ -60,35 +60,35 @@ class StubbedSshnpCore extends SshnpCore with StubbedAsyncInitializationMixin { /// Stubbed mixin wrapper mixin StubbedAsyncInitializationMixin on AsyncInitialization { - late FunctionStub _mockCallInitialization; - late FunctionStub _mockInitialize; - late FunctionStub _mockCompleteInitialization; + late FunctionStub _stubbedCallInitialization; + late FunctionStub _stubbedInitialize; + late FunctionStub _stubbedCompleteInitialization; void stubAsyncInitialization({ - required FunctionStub mockCallInitialization, - required FunctionStub mockInitialize, - required FunctionStub mockCompleteInitialization, + required FunctionStub stubbedCallInitialization, + required FunctionStub stubbedInitialize, + required FunctionStub stubbedCompleteInitialization, }) { - _mockCallInitialization = mockCallInitialization; - _mockInitialize = mockInitialize; - _mockCompleteInitialization = mockCompleteInitialization; + _stubbedCallInitialization = stubbedCallInitialization; + _stubbedInitialize = stubbedInitialize; + _stubbedCompleteInitialization = stubbedCompleteInitialization; } @override Future callInitialization() async { - _mockCallInitialization.call(); + _stubbedCallInitialization.call(); return super.callInitialization(); } @override Future initialize() async { - _mockInitialize.call(); + _stubbedInitialize.call(); await super.initialize(); } @override void completeInitialization() { - _mockCompleteInitialization.call(); + _stubbedCompleteInitialization.call(); super.completeInitialization(); } } diff --git a/packages/noports_core/test/sshnp/sshnp_core_test.dart b/packages/noports_core/test/sshnp/sshnp_core_test.dart index 744528414..82f11ef71 100644 --- a/packages/noports_core/test/sshnp/sshnp_core_test.dart +++ b/packages/noports_core/test/sshnp/sshnp_core_test.dart @@ -107,9 +107,9 @@ void main() { /// Setup stubs for the mocks that are part of [MockAsyncInitializationMixin] sshnpCore.stubAsyncInitialization( - mockCallInitialization: stubbedCallInitialization, - mockCompleteInitialization: stubbedCompleteInitialization, - mockInitialize: stubbedInitialize, + stubbedCallInitialization: stubbedCallInitialization, + stubbedCompleteInitialization: stubbedCompleteInitialization, + stubbedInitialize: stubbedInitialize, ); whenInitialization(identityKeyPair: sshnpCore.identityKeyPair);