From 1e4f2dab32050986f2c3ca9ab83c5fb5264ea4e0 Mon Sep 17 00:00:00 2001 From: gkc Date: Mon, 4 Dec 2023 14:05:50 +0000 Subject: [PATCH] fix: ensure verbose is mocked for mockParams --- .../test/sshnp/util/sshnpd_channel/sshnpd_channel_test.dart | 1 + .../sshnp/util/sshnpd_channel/sshnpd_default_channel_test.dart | 1 + .../util/sshnpd_channel/sshnpd_unsigned_channel_test.dart | 1 + .../test/sshnp/util/sshrvd_channel/sshrvd_channel_test.dart | 1 + .../sshnp/util/sshrvd_channel/sshrvd_dart_channel_test.dart | 2 ++ .../sshnp/util/sshrvd_channel/ssrhvd_exec_channel_test.dart | 3 +++ 6 files changed, 9 insertions(+) diff --git a/packages/noports_core/test/sshnp/util/sshnpd_channel/sshnpd_channel_test.dart b/packages/noports_core/test/sshnp/util/sshnpd_channel/sshnpd_channel_test.dart index 595e4a17b..b20a5ed76 100644 --- a/packages/noports_core/test/sshnp/util/sshnpd_channel/sshnpd_channel_test.dart +++ b/packages/noports_core/test/sshnp/util/sshnpd_channel/sshnpd_channel_test.dart @@ -37,6 +37,7 @@ void main() { setUp(() { mockAtClient = MockAtClient(); mockParams = MockSshnpParams(); + when(() => mockParams.verbose).thenReturn(false); sessionId = Uuid().v4(); notificationStreamController = StreamController(); notifyStub = NotifyStub(); diff --git a/packages/noports_core/test/sshnp/util/sshnpd_channel/sshnpd_default_channel_test.dart b/packages/noports_core/test/sshnp/util/sshnpd_channel/sshnpd_default_channel_test.dart index bdc59dc81..d342d7932 100644 --- a/packages/noports_core/test/sshnp/util/sshnpd_channel/sshnpd_default_channel_test.dart +++ b/packages/noports_core/test/sshnp/util/sshnpd_channel/sshnpd_default_channel_test.dart @@ -41,6 +41,7 @@ void main() { notificationStreamController = StreamController(); subscribeStub = SubscribeStub(); + when(() => mockParams.verbose).thenReturn(false); when(() => mockParams.device).thenReturn(device); namespace = '$device.sshnp'; diff --git a/packages/noports_core/test/sshnp/util/sshnpd_channel/sshnpd_unsigned_channel_test.dart b/packages/noports_core/test/sshnp/util/sshnpd_channel/sshnpd_unsigned_channel_test.dart index ca2573c51..093272c91 100644 --- a/packages/noports_core/test/sshnp/util/sshnpd_channel/sshnpd_unsigned_channel_test.dart +++ b/packages/noports_core/test/sshnp/util/sshnpd_channel/sshnpd_unsigned_channel_test.dart @@ -34,6 +34,7 @@ void main() { notificationStreamController = StreamController(); subscribeStub = SubscribeStub(); + when(() => mockParams.verbose).thenReturn(false); when(() => mockParams.device).thenReturn(device); namespace = '$device.sshnp'; diff --git a/packages/noports_core/test/sshnp/util/sshrvd_channel/sshrvd_channel_test.dart b/packages/noports_core/test/sshnp/util/sshrvd_channel/sshrvd_channel_test.dart index 3fef43af8..9b460d318 100644 --- a/packages/noports_core/test/sshnp/util/sshrvd_channel/sshrvd_channel_test.dart +++ b/packages/noports_core/test/sshnp/util/sshrvd_channel/sshrvd_channel_test.dart @@ -45,6 +45,7 @@ void main() { notifyStub = NotifyStub(); subscribeStub = SubscribeStub(); mockParams = MockSshnpParams(); + when(() => mockParams.verbose).thenReturn(false); sessionId = Uuid().v4(); mockSshrv = MockSshrv(); diff --git a/packages/noports_core/test/sshnp/util/sshrvd_channel/sshrvd_dart_channel_test.dart b/packages/noports_core/test/sshnp/util/sshrvd_channel/sshrvd_dart_channel_test.dart index 7ea836892..a8d558bc2 100644 --- a/packages/noports_core/test/sshnp/util/sshrvd_channel/sshrvd_dart_channel_test.dart +++ b/packages/noports_core/test/sshnp/util/sshrvd_channel/sshrvd_dart_channel_test.dart @@ -1,3 +1,4 @@ +import 'package:mocktail/mocktail.dart'; import 'package:noports_core/sshnp_foundation.dart'; import 'package:socket_connector/socket_connector.dart'; import 'package:test/test.dart'; @@ -14,6 +15,7 @@ void main() { setUp(() { mockAtClient = MockAtClient(); mockSshnpParams = MockSshnpParams(); + when(() => mockSshnpParams.verbose).thenReturn(false); sessionId = Uuid().v4(); }); test('public API', () { diff --git a/packages/noports_core/test/sshnp/util/sshrvd_channel/ssrhvd_exec_channel_test.dart b/packages/noports_core/test/sshnp/util/sshrvd_channel/ssrhvd_exec_channel_test.dart index ba08ddae2..6fd0a1965 100644 --- a/packages/noports_core/test/sshnp/util/sshrvd_channel/ssrhvd_exec_channel_test.dart +++ b/packages/noports_core/test/sshnp/util/sshrvd_channel/ssrhvd_exec_channel_test.dart @@ -1,3 +1,4 @@ +import 'package:mocktail/mocktail.dart'; import 'package:noports_core/src/common/io_types.dart'; import 'package:noports_core/sshnp_foundation.dart'; import 'package:test/test.dart'; @@ -14,6 +15,8 @@ void main() { setUp(() { mockAtClient = MockAtClient(); mockSshnpParams = MockSshnpParams(); + when(() => mockSshnpParams.verbose).thenReturn(false); + sessionId = Uuid().v4(); }); test('public API', () {