Skip to content

Commit 47aff99

Browse files
committed
Remove MockCaptureConnection videoOrientation backing value
1 parent 3fa1291 commit 47aff99

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

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

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,17 @@
33
// found in the LICENSE file.
44

55
/// A mock implementation of `FLTCaptureConnection` that allows injecting a custom implementation.
6-
class MockCaptureConnection: NSObject, FLTCaptureConnection {
6+
final class MockCaptureConnection: NSObject, FLTCaptureConnection {
77
var setVideoOrientationStub: ((AVCaptureVideoOrientation) -> Void)?
88

99
var connection: AVCaptureConnection {
1010
preconditionFailure("Attempted to access unimplemented property: connection")
1111
}
1212
var isVideoMirrored = false
13-
var _videoOrientation = AVCaptureVideoOrientation.portrait
1413
var videoOrientation: AVCaptureVideoOrientation {
15-
get {
16-
return _videoOrientation
17-
}
14+
get { AVCaptureVideoOrientation.portrait }
1815
set {
19-
if let stub = setVideoOrientationStub {
20-
stub(newValue)
21-
} else {
22-
_videoOrientation = newValue
23-
}
16+
setVideoOrientationStub?(newValue)
2417
}
2518
}
2619
var inputPorts: [AVCaptureInput.Port] = []

0 commit comments

Comments
 (0)