RunnerTests.swift 752 B

1234567891011121314151617181920212223242526
  1. import Flutter
  2. import UIKit
  3. import XCTest
  4. @testable import compdfkit_flutter
  5. // This demonstrates a simple unit test of the Swift portion of this plugin's implementation.
  6. //
  7. // See https://developer.apple.com/documentation/xctest for more information about using XCTest.
  8. class RunnerTests: XCTestCase {
  9. func testGetPlatformVersion() {
  10. let plugin = CompdfkitFlutterPlugin()
  11. let call = FlutterMethodCall(methodName: "getPlatformVersion", arguments: [])
  12. let resultExpectation = expectation(description: "result block must be called.")
  13. plugin.handle(call) { result in
  14. XCTAssertEqual(result as! String, "iOS " + UIDevice.current.systemVersion)
  15. resultExpectation.fulfill()
  16. }
  17. waitForExpectations(timeout: 1)
  18. }
  19. }