Book Image

RabbitMQ Essentials

By : David Dossot
Book Image

RabbitMQ Essentials

By: David Dossot

Overview of this book

Table of Contents (17 chapters)

Testing RabbitMQ applications


Developers at Clever Coney Media are test infected; they can't ship any piece of software that hasn't been properly tested in an automated fashion and with enough coverage. So how is it that you haven't seen any test until now? We wanted to keep the main focus on RabbitMQ and AMQP, so we didn't include testing in the discussions. As we're closing this book, now is a good time to revisit the code you've written and detail the tests that were created for it. We will focus on the main Java application, as it is where the vast majority of the critical code resides; however, the principles and practices you will learn about are applicable to any language or platform.

Your approach to test RabbitMQ applications is twofold:

  • Create a set of unit tests that exercise the behavior of your classes, one by one and in isolation. In these unit tests, use mock objects instead of the actual RabbitMQ client classes to ensure that things are wired up together the way they should...