From b4a8f503c70b06724592b4995c87c8fcd10cd7ba Mon Sep 17 00:00:00 2001 From: Codel1417 Date: Wed, 5 Jun 2024 13:44:21 -0400 Subject: [PATCH] setup ble mock --- test/Frontend/utils_test.dart | 2 +- test/testing_utils/bluetooth_test_utils.dart | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 test/testing_utils/bluetooth_test_utils.dart diff --git a/test/Frontend/utils_test.dart b/test/Frontend/utils_test.dart index db62ce29..1c9900a2 100644 --- a/test/Frontend/utils_test.dart +++ b/test/Frontend/utils_test.dart @@ -8,7 +8,7 @@ import 'package:tail_app/constants.dart'; import 'package:test/test.dart'; // Annotation which generates the cat.mocks.dart library and the MockCat class. -@GenerateNiceMocks([MockSpec(), MockSpec(), MockSpec(), MockSpec()]) +@GenerateNiceMocks([MockSpec(), MockSpec()]) import 'utils_test.mocks.dart'; void main() { diff --git a/test/testing_utils/bluetooth_test_utils.dart b/test/testing_utils/bluetooth_test_utils.dart new file mode 100644 index 00000000..29fd8cc7 --- /dev/null +++ b/test/testing_utils/bluetooth_test_utils.dart @@ -0,0 +1,11 @@ +import 'package:mockito/annotations.dart'; +import 'package:tail_app/Backend/Bluetooth/bluetooth_manager_plus.dart'; +import 'package:tail_app/Backend/Bluetooth/bluetooth_utils.dart'; + +// Annotation which generates the cat.mocks.dart library and the MockCat class. +@GenerateNiceMocks([MockSpec()]) +import 'bluetooth_test_utils.mocks.dart'; + +void setupBTMock() { + flutterBluePlus = MockFlutterBluePlusMockable(); +}