Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Commit

Permalink
Apply review feedback.
Browse files Browse the repository at this point in the history
  • Loading branch information
mvanbeusekom committed Oct 18, 2021
1 parent 9093887 commit 1d51203
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* The expectation is fullfilled when a result is called allowing tests to await the result in an
* asynchronous manner.
*/
- (instancetype _Nonnull)initWithExpectation:(nonnull XCTestExpectation *)expectation;
- (nonnull instancetype)initWithExpectation:(nonnull XCTestExpectation *)expectation;
@end

#endif /* MockFLTThreadSafeFlutterResult_h */
12 changes: 8 additions & 4 deletions packages/camera/camera/ios/Classes/CameraPlugin_Test.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,17 @@
/// Hide the default public constructor.
- (instancetype)init NS_UNAVAILABLE;

/// Exposes the [CameraPlugin handleMethodCallAsync:result:] method for unit testing.
/// Handles `FlutterMethodCall`s and ensures result is send on the main dispatch queue.
///
/// This method should always be dispatched on a background queue to prevent deadlocks.

/// @param call The method call command object.
/// @param result A wrapper around the `FlutterResult` callback which ensures the callback is called
/// on the main dispatch queue.
- (void)handleMethodCallAsync:(FlutterMethodCall *)call result:(FLTThreadSafeFlutterResult *)result;

/// Exposes the [CameraPlugin orientationChanged:] method for unit testing.
/// Called by the @c NSNotificationManager each time the device's orientation is changed.
///
/// @param notification @c NSNotification instance containing a reference to the `UIDevice` object
/// that triggered the orientation change.
- (void)orientationChanged:(NSNotification *)notification;

@end

0 comments on commit 1d51203

Please sign in to comment.