Files
max_print_plus/example/ios/RunnerTests/RunnerTests.swift
Tothemax Dev 5419429426 first commit
2024-09-27 13:30:11 +07:00

28 lines
746 B
Swift

import Flutter
import UIKit
import XCTest
@testable import max_print_plus
// This demonstrates a simple unit test of the Swift portion of this plugin's implementation.
//
// See https://developer.apple.com/documentation/xctest for more information about using XCTest.
class RunnerTests: XCTestCase {
func testGetPlatformVersion() {
let plugin = MaxPrintPlusPlugin()
let call = FlutterMethodCall(methodName: "getPlatformVersion", arguments: [])
let resultExpectation = expectation(description: "result block must be called.")
plugin.handle(call) { result in
XCTAssertEqual(result as! String, "iOS " + UIDevice.current.systemVersion)
resultExpectation.fulfill()
}
waitForExpectations(timeout: 1)
}
}