Practical Test-Driven Development for Java Programmers

Practical Test-Driven Development for Java Programmers
Practical Test-Driven Development for Java Programmers
English | MP4 | AVC 1280×720 | AAC 48KHz 2ch | 3h 50m | 547 MB

Learn how to use tests to drive the writing of your code, a key component of agile programming. More than just theory, this course covers a range of practical topics that can help Java developers get up and running with test-driven development (TDD). Instructor Matt Greencroft helps to acquaint you with the process that’s required for TDD, as well as how to deal with real-world challenges you may encounter when carrying out TDD. Discover how to write your first test and determine what makes a good or bad test. Plus, learn how to test code where there’s a dependency on third-party resources, how to create mocks and stubs with Mockito—a popular third-party library—and more.

Table of Contents

1 Welcome
2 What is test-driven development
3 What do you want to test
4 The case study
5 Set up instructions for IntelliJ users
6 Setting up the project structure
7 JUnit basics
8 Examples and outcomes
9 Getting to red
10 Getting to green
11 Why you always start with red
12 Adding more tests
13 Understanding the business logic
14 Finally writing some code
15 Testing for exceptions
16 Challenge 1
17 Walkthrough 1
18 Challenge 2
19 Walkthrough 2 and challenge 3
20 Walkthrough 3
21 Getting to more complex requirements
22 Using TDD to safely fix bugs
23 Challenge 4 and walkthrough 4
24 Finishing the business requirements
25 Introducing refactoring
26 Restructuring code
27 Good and bad tests
28 JUnit asserts
29 Testing code with dependencies
30 Building an example
31 Creating the stub
32 Why mocks are useful
33 Creating a mock
34 Testing behaviour
35 Mockito syntax options
36 Reviewing fakes and tautologies
37 Challenge 5
38 Walkthrough 5
39 Using setUp and tearDown
40 Tautologies
41 How to avoid tautologies
42 Loading up the final case study
43 Understanding the project structure
44 Understanding the business logic
45 Adding Mockito
46 Setting up the tests
47 The need for spying
48 Challenge 6
49 Walkthrough 6, part 1
50 Walkthrough 6, part 2