March 2015
Intermediate to advanced
236 pages
5h 26m
English
| Foreword |
| Preface |
| Why Unit Testing |
| Who This Book Is For |
| What You Need |
| How to Use This Book |
| Code and Online Resources |
| Acknowledgments |
| 1. | Building Your First JUnit Test |
| Reasons to Write a Unit Test |
| Learning JUnit Basics: Our First Passing Test |
| Arrange, Act, and Assert Your Way to a Test |
| Is the Test Really Testing Anything? |
| After |
| 2. | Getting Real with JUnit |
| Understanding What We’re Testing: The Profile Class |
| Determining What Tests We Can Write |
| Covering One Path |
| Tackling a Second Test |
| Initializing Tests with @Before Methods |
| How Ya Feelin’ Now? |
| After |
| 3. | Digging Deeper into JUnit Assertions |
| Assertions in JUnit |
| Three Schools for Expecting Exceptions |
| After |
| 4. | Organizing Your Tests |
| Keeping Tests Consistent with AAA |
| Testing Behavior Versus ... |
Read now
Unlock full access