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 the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.