Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
func test_receiveImage_onButtonClick2() {
simulateTaps(at: 100, 200)
let observer = testScheduler.createObserver(UIImage.self)
subject.image.drive(observer)
.disposed(by: rx_disposeBag)
testScheduler.start()
XCTAssertEqual(observer.events, [next(100, imageHavingMock.expectedImage), next(200, imageHavingMock.expectedImage)])
}
func simulateTaps(at times: Int...) {
let events: [Recorded<Event<Void>>] = times.map { next($0, ()) }
let taps = testScheduler.createHotObservable(events)
taps.bindTo(subject.chooseImageButtonPressed)
.disposed(by: rx_disposeBag)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.