Skip to content

Commit ea709f7

Browse files
committed
Make mock classes final and correct formatting
1 parent 47aff99 commit ea709f7

File tree

5 files changed

+12
-7
lines changed

5 files changed

+12
-7
lines changed

packages/camera/camera_avfoundation/example/ios/RunnerTests/Mocks/MockCaptureDeviceFormat.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
/// A mock implementation of `FLTCaptureDeviceFormat` that allows mocking the class
66
/// properties.
7-
class MockCaptureDeviceFormat: NSObject, FLTCaptureDeviceFormat {
7+
final class MockCaptureDeviceFormat: NSObject, FLTCaptureDeviceFormat {
88

99
/// The format associated with the capture device.
1010
var format: AVCaptureDevice.Format {

packages/camera/camera_avfoundation/example/ios/RunnerTests/Mocks/MockCapturePhotoOutput.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import AVFoundation
66

77
/// Mock implementation of `FLTCapturePhotoOutput` protocol which allows injecting a custom
88
/// implementation.
9-
class MockCapturePhotoOutput: NSObject, FLTCapturePhotoOutput {
9+
final class MockCapturePhotoOutput: NSObject, FLTCapturePhotoOutput {
1010
var avOutput = AVCapturePhotoOutput()
1111
var availablePhotoCodecTypes: [AVVideoCodecType] = []
1212
var highResolutionCaptureEnabled = false

packages/camera/camera_avfoundation/example/ios/RunnerTests/Mocks/MockFlutterBinaryMessenger.swift

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,15 @@ final class MockFlutterBinaryMessenger: NSObject, FlutterBinaryMessenger {
99
func send(onChannel channel: String, message: Data?) {}
1010

1111
func send(
12-
onChannel channel: String, message: Data?, binaryReply callback: FlutterBinaryReply? = nil
12+
onChannel channel:
13+
String,
14+
message:
15+
Data?, binaryReply callback: FlutterBinaryReply? = nil
1316
) {}
1417

1518
func setMessageHandlerOnChannel(
16-
_ channel: String, binaryMessageHandler handler: FlutterBinaryMessageHandler? = nil
19+
_ channel: String,
20+
binaryMessageHandler handler: FlutterBinaryMessageHandler? = nil
1721
) -> FlutterBinaryMessengerConnection { 0 }
1822

1923
func cleanUpConnection(_ connection: FlutterBinaryMessengerConnection) {}

packages/camera/camera_avfoundation/example/ios/RunnerTests/Mocks/MockFrameRateRange.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// found in the LICENSE file.
44

55
/// A mock implementation of `FLTFrameRateRange` that allows mocking the class properties.
6-
class MockFrameRateRange: NSObject, FLTFrameRateRange {
6+
final class MockFrameRateRange: NSObject, FLTFrameRateRange {
77
var minFrameRate: Float
88
var maxFrameRate: Float
99

packages/camera/camera_avfoundation/example/ios/RunnerTests/Mocks/MockGlobalEventApi.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
/// A mock implementation of `FCPCameraGlobalEventApi` that captures received
66
/// `deviceOrientationChanged` events and exposes whether they were received to the testing code.
7-
class MockGlobalEventApi: FCPCameraGlobalEventApi {
7+
final class MockGlobalEventApi: FCPCameraGlobalEventApi {
88

99
/// Whether the `deviceOrientationChanged` callback was called.
1010
var deviceOrientationChangedCalled = false
@@ -13,7 +13,8 @@ class MockGlobalEventApi: FCPCameraGlobalEventApi {
1313
var lastOrientation = FCPPlatformDeviceOrientation.portraitUp
1414

1515
override func deviceOrientationChangedOrientation(
16-
_ orientation: FCPPlatformDeviceOrientation, completion: @escaping (FlutterError?) -> Void
16+
_ orientation: FCPPlatformDeviceOrientation,
17+
completion: @escaping (FlutterError?) -> Void
1718
) {
1819
deviceOrientationChangedCalled = true
1920
lastOrientation = orientation

0 commit comments

Comments
 (0)