I am using Xcode 14.3.1 to develop and I have this unit test:
@testable import bimb_authenticate_ios
import XCTest
import RxSwift
import RxBlocking
final class BindingApiClientTests: XCTestCase {
private var disposeBag = DisposeBag()
override func setUpWithError() throws {
// Put setup code here. This method is called before the invocation of each test method in the class.
disposeBag = DisposeBag()
}
override func tearDownWithError() throws {
// Put teardown code here. This method is called after the invocation of each test method in the class.
}
func testPostInternetBankingCredentials_WhenSuccess() throws {
XCTAssertEqual(1, 1)
// let expectedParams = getExpectedIBCredsParams()
// let expectedResponseModel = getExpectedIBCredentialsResponseModel()
// let expectedData = try expectedResponseModel.jsonData() // Encodable to Data from JSON string
// let expectedOutput = Single.just(expectedData)
// let apiDataSource = MockDataSource(postOutputEvent: expectedOutput)
// let sut = BindingApiClient(apiDataSource: apiDataSource)
//
// let expectation = expectation(description: "Expect Success!")
// var actualResponseModel: IBCredentialsResponseModel? = try sut
// .postInternetBankingCredentials(with: expectedParams)
// .debug()
// .toBlocking()
// .first()
//
//// sut.postInternetBankingCredentials(with: expectedParams)
//// .subscribe(onSuccess: {
//// actualResponseModel = $0
//// expectation.fulfill()
//// })
//// .disposed(by: disposeBag)
////
//// wait(for: [expectation], timeout: 0.1)
// XCTAssertEqual(expectedResponseModel,
// actualResponseModel)
// XCTAssertEqual(expectedParams.toJSONString(),
// apiDataSource.postParamsInput?.toJSONString())
// XCTAssertTrue(apiDataSource.isPostCalled)
}
}`
But it never run even though it only had one simple line, XCTAssertEqual(1, 1)
. It just started and will be processing ad infinitum. There is no log whatsoever except for the logs for successful compilations of pods and some swiftlint warnings. Can anybody help me?
Thanks.