I am trying to write test cases and trying to access a method which returns Single object. For this I want to use toBlocking but I am not able to access it and getting following error:
Value of type 'Single<[Property]>' (aka 'PrimitiveSequence>') has no member 'toBlocking'
Following is my code
do {
let property = try viewModel.getPropertyList(city: "1530")
.toBlocking()
.single()
XCTAssertNotNil(property)
} catch {
XCTFail("Get user settings failed")
}
Already imported following frameworks:
import RxCocoa
import RxSwift
import XCTest