Example: Testing a ReactiveUI Application with Rx

In this section we return to the extended sample, RxUISample, of the previous chapter, and we use Rx's testing library to help us write unit tests. Testing the interaction logic in a user interface is a great application of Rx's testing libraries because most non-trivial UIs run code in the background. Testing to make sure the UI responds appropriately is difficult to do. However, with Rx, we can model different user scenarios (“User clicks a button, types some text, and hits Search,” for example), and make sure our code reacts appropriately. In the previous chapter, we demonstrated an application that searches for images via Flickr. Despite this interface being very simple, this application has ...

Get Programming Reactive Extensions and LINQ now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.