We will start a new test and create an Observable of 10, 20, and 30, as follows:
func testBlocking(){ let observableToTest = Observable.of(10, 20, 30) }
Now we will define the result as equal to calling toBlocking() on the observable we created:
let result = observableToTest.toBlocking()
toBlocking() returns a blocking Observable to a straight array, as you can see here:
We will need to use the first method if we want to interrogate which is a throwing method, so we will wrap it in a do catch statement, and then we will add an AssertEquals statement if it is successful, as follows:
func testBlocking(){ let observableToTest ...