AutoCat2/AutoCat2Tests/ApiTests.swift

31 lines
869 B
Swift

import XCTest
import AutoCat2
class ApiTests: XCTestCase {
private var api: Api!
override func setUpWithError() throws {
let sessionConfig = URLSessionConfiguration.default
sessionConfig.protocolClasses = [MockURLProtocol.self]
let session = URLSession(configuration: sessionConfig)
self.api = Api(session: session)
}
override func tearDownWithError() throws {
// Put teardown code here. This method is called after the invocation of each test method in the class.
}
func testLogin() async throws {
let user = try await self.api.login(email: "", password: "")
}
// func testPerformanceExample() throws {
// // This is an example of a performance test case.
// self.measure {
// // Put the code you want to measure the time of here.
// }
// }
}