flutter plugin for zebra multiplatform sdk

RunnerTests.m 1.1KB

12345678910111213141516171819202122232425262728293031323334
  1. #import <Flutter/Flutter.h>
  2. #import <UIKit/UIKit.h>
  3. #import <XCTest/XCTest.h>
  4. @import flutter_zsdk;
  5. // This demonstrates a simple unit test of the Objective-C portion of this plugin's implementation.
  6. //
  7. // See https://developer.apple.com/documentation/xctest for more information about using XCTest.
  8. @interface RunnerTests : XCTestCase
  9. @end
  10. @implementation RunnerTests
  11. - (void)testExample {
  12. FlutterZsdkPlugin *plugin = [[FlutterZsdkPlugin alloc] init];
  13. FlutterMethodCall *call = [FlutterMethodCall methodCallWithMethodName:@"getPlatformVersion"
  14. arguments:nil];
  15. XCTestExpectation *expectation = [self expectationWithDescription:@"result block must be called"];
  16. [plugin handleMethodCall:call
  17. result:^(id result) {
  18. NSString *expected = [NSString
  19. stringWithFormat:@"iOS %@", UIDevice.currentDevice.systemVersion];
  20. XCTAssertEqualObjects(result, expected);
  21. [expectation fulfill];
  22. }];
  23. [self waitForExpectationsWithTimeout:1 handler:nil];
  24. }
  25. @end