From f9eff5a706d8f66f7f3443fe8a280b96a378ca54 Mon Sep 17 00:00:00 2001 From: xavierchanth Date: Mon, 20 Nov 2023 16:03:23 -0500 Subject: [PATCH] test: sshrvd channel implementations --- .../sshrvd_dart_channel_test.dart | 31 ++++++++++++++++++- .../ssrhvd_exec_channel_test.dart | 31 ++++++++++++++++++- 2 files changed, 60 insertions(+), 2 deletions(-) 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 05a37e983..7ea836892 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 +1,30 @@ -void main() {} \ No newline at end of file +import 'package:noports_core/sshnp_foundation.dart'; +import 'package:socket_connector/socket_connector.dart'; +import 'package:test/test.dart'; +import 'package:uuid/uuid.dart'; + +import '../../sshnp_mocks.dart'; + +void main() { + group('SshrvdDartChannel', () { + late MockAtClient mockAtClient; + late MockSshnpParams mockSshnpParams; + late String sessionId; + + setUp(() { + mockAtClient = MockAtClient(); + mockSshnpParams = MockSshnpParams(); + sessionId = Uuid().v4(); + }); + test('public API', () { + expect( + SshrvdDartChannel( + atClient: mockAtClient, + params: mockSshnpParams, + sessionId: sessionId, + ), + isA>(), + ); + }); + }); // group SshrvdDartChannel +} 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 05a37e983..ba08ddae2 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 +1,30 @@ -void main() {} \ No newline at end of file +import 'package:noports_core/src/common/io_types.dart'; +import 'package:noports_core/sshnp_foundation.dart'; +import 'package:test/test.dart'; +import 'package:uuid/uuid.dart'; + +import '../../sshnp_mocks.dart'; + +void main() { + group('SshrvdExecChannel', () { + late MockAtClient mockAtClient; + late MockSshnpParams mockSshnpParams; + late String sessionId; + + setUp(() { + mockAtClient = MockAtClient(); + mockSshnpParams = MockSshnpParams(); + sessionId = Uuid().v4(); + }); + test('public API', () { + expect( + SshrvdExecChannel( + atClient: mockAtClient, + params: mockSshnpParams, + sessionId: sessionId, + ), + isA>(), + ); + }); + }); // group SshrvdDartChannel +}