Book Image

Learning Reactive Programming with Java 8

By : Nickolay Tzvetinov
Book Image

Learning Reactive Programming with Java 8

By: Nickolay Tzvetinov

Overview of this book

Table of Contents (15 chapters)
Learning Reactive Programming with Java 8
About the Author
About the Reviewers

Chapter 7. Testing Your RxJava Application

While writing software, especially software which will be used by a lot of users, we need to be sure that everything is working correctly. We can write readable, well-structured, and modular code, which will make it easier for changing and maintaining. We should write tests because, with every feature, there is the danger of regression. When we already have tests for the existing code, refactoring it won't be as hard, because the tests could be run against the new, changed code.

Almost everything needs to be tested and automated. There are even ideologies such as test-driven development (TDD) and behavior-driven development (BDD). If we don't write automated tests, our ever-changing code tends to break over time and becomes even harder to test and maintain.

In this chapter, we won't be talking about why we need to test our code. We'll accept that this is mandatory and is part of our life as programmers. We'll learn how to test the code written using...