Pragmatic Unit Testing in Java 8 With JUnit steps you through all the important unit testing topics. If you've never written a unit test, you'll see screen shots from Eclipse, IntelliJ IDEA, and NetBeans that will help you get past the hard part--getting set up and started.
Once past the basics, you'll learn why you want to write unit tests and how to effectively use JUnit. But the meaty part of the book is its collected unit testing wisdom from people who've been there, done that on production systems for at least 15 years: veteran author and developer Jeff Langr, building on the wisdom of Pragmatic Programmers Andy Hunt and Dave Thomas. You'll learn:
How to craft your unit tests to minimize your effort in maintaining them. How to use unit tests to help keep your system clean.How to test the tough stuff.Memorable mnemonics to help you remember what's important when writing unit tests.How to help your team reap and sustain the benefits of unit testing.
You won't just learn about unit testing in theory--you'll work through numerous code examples. When it comes to programming, hands-on is the only way to learn!
Master Java 5.0, object-oriented design, and Test-Driven Development (TDD) by learning them together. Agile Java weaves all three into a single coherent approach to building professional, robust software systems. Jeff Langr shows exactly how Java and TDD integrate throughout the entire development lifecycle, helping you leverage today's fastest, most efficient development techniques from the very outset.
Langr writes for every programmer, even those with little or no experience with Java, object-oriented development, or agile methods. He shows how to translate oral requirements into practical tests, and then how to use those tests to create reliable, high-performance Java code that solves real problems. Agile Java doesn't just teach the core features of the Java language: it presents coded test examples for each of them. This TDD-centered approach doesn't just lead to better code: it provides powerful feedback that will help you learn Java far more rapidly. The use of TDD as a learning mechanism is a landmark departure from conventional teaching techniques.Presents an expert overview of TDD and agile programming techniques from the Java developer's perspective Brings together practical best practices for Java, TDD, and OO design Walks through setting up Java 5.0 and writing your first program Covers all the basics, including strings, packages, and more Simplifies object-oriented concepts, including classes, interfaces, polymorphism, and inheritance Contains detailed chapters on exceptions and logging, math, I/O, reflection, multithreading, and Swing Offers seamlessly-integrated explanations of Java 5.0's key innovations, from generics to annotations Shows how TDD impacts system design, and vice versa Complements any agile or traditional methodology, including Extreme Programming (XP)
Modern C++ Programming With Test-Driven Development, the only comprehensive treatment on TDD in C++ provides you with everything you need to know about TDD, and the challenges and benefits of implementing it in your C++ systems. Its many detailed code examples take you step-by-step from TDD basics to advanced concepts. As a veteran C++ programmer, you're already writing high-quality code, and you work hard to maintain code quality. It doesn't have to be that hard.
In this book, you'll learn:how to use TDD to improve legacy C++ systemshow to identify and deal with troublesome system dependencieshow to do dependency injection, which is particularly tricky in C++how to use testing tools for C++ that aid TDDnew C++11 features that facilitate TDD
As you grow in TDD mastery, you'll discover how to keep a massive C++ system from becoming a design mess over time, as well as particular C++ trouble spots to avoid. You'll find out how to prevent your tests from being a maintenance burden and how to think in TDD without giving up your hard-won C++ skills. Finally, you'll see how to grow and sustain TDD in your team.
Whether you're a complete unit-testing novice or an experienced tester, this book will lead you to mastery of test-driven development in C++.
What You NeedA C++ compiler running under Windows or Linux, preferably one that supports C++11. Examples presented in the book were built under gcc 4.7.2.Google Mock 1.6 (downloadable for free; it contains Google Test as well) or an alternate C++ unit testing tool. Most examples in the book are written for Google Mock, but it isn't difficult to translate them to your tool of choice.A good programmer's editor or IDE.cmake, preferably. Of course, you can use your own preferred make too. CMakeLists.txt files are provided for each project. Examples provided were built using cmake version 2.8.9.Various freely-available third-party libraries are used as the basis for examples in the book. These include: cURLJsonCppBoost (filesystem, date_time/gregorian, algorithm, assign)
Several examples use the boost headers/libraries. Only one example uses cURL and JsonCpp.