Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
func test_receiveImage_onButtonClick_version2() {
let buttonTaps = testScheduler.createHotObservable([next(100, ()), next(200, ())])
buttonTaps.bindTo(subject.chooseImageButtonPressed)
.disposed(by: rx_disposeBag)
let observer = testScheduler.createObserver(UIImage.self)
self.subject.image.drive(observer)
.disposed(by: self.rx_disposeBag)
testScheduler.start()
let expectedEvents = [
next(100, imageHavingMock.expectedImage),
next(200, imageHavingMock.expectedImage)
]
XCTAssertEqual(observer.events, expectedEvents)
}
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.