Files
flutter_libsparkmobile/example/ios/RunnerTests/RunnerTests.swift
sneurlax 7d0b91ab91 flutter create --template=plugin
flutter create --org com.cypherstack --template=plugin --platforms=android,ios,linux,macos,windows flutter_libsparkmobile
2023-10-30 10:51:33 -05:00

27 lines
762 B
Swift

import Flutter
import UIKit
import XCTest
@testable import flutter_libsparkmobile
// 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 = FlutterLibsparkmobilePlugin()
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)
}
}