Table of Contents

 

Copyright

Brief Table of Contents

Table of Contents

Foreword

Preface

Acknowledgments

About this Book

About the Cover Illustration

1. The building blocks

Chapter 1. Fundamentals

1.1. What is Programmer Testing?

1.1.1. The goal of Object Testing

1.1.2. The rhythm of an Object Test

1.1.3. A framework for unit testing

1.1.4. Enter JUnit

1.1.5. Understanding Test-Driven Development

1.2. Getting started with JUnit

1.2.1. Downloading and installing JUnit

1.2.2. Writing a simple test

1.2.3. Understanding the TestCase class

1.2.4. Failure messages

1.2.5. How JUnit signals a failed assertion

1.2.6. The difference between failures and errors

1.3. A few good practices

1.3.1. Naming conventions for tests and test classes

1.3.2. Test behavior, not methods

1.4. Summary

Chapter 2. Elementary tests

2.1. Test your equals method

Problem

Background

Recipe

Discussion

Related

2.2. Test a method that returns nothing

Problem

Background

Recipe

Discussion

Related

2.3. Test a constructor

Problem

Background

Recipe

Discussion

Related

2.4. Test a getter

Problem

Background

Recipe