1 00:00:00,000 --> 00:00:02,288 In this section, we're going to be hands on and walk 2 00:00:02,288 --> 00:00:04,184 through the creation of some production code and 3 00:00:04,184 --> 00:00:06,300 use the JUnit API to test it. 4 00:00:06,300 --> 00:00:07,940 As we do this, we're going to explain 5 00:00:07,940 --> 00:00:10,064 JUnit features in a just in time way. 6 00:00:10,064 --> 00:00:12,056 So in other words, explain the features as we go 7 00:00:12,056 --> 00:00:13,964 along and need to use them in this way 8 00:00:13,964 --> 00:00:15,655 they're explaining context. 9 00:00:15,655 --> 00:00:17,336 Now, the code we're going to look at 10 00:00:17,336 --> 00:00:19,222 is simple and this is by design. 11 00:00:19,222 --> 00:00:20,792 We're not looking to write tons of 12 00:00:20,792 --> 00:00:23,362 complex unit tests which test hugely complex 13 00:00:23,362 --> 00:00:25,289 pieces of functionality in this section. 14 00:00:25,289 --> 00:00:27,136 Now we just want to take easy to walk 15 00:00:27,136 --> 00:00:29,000 steps where we can understand what's happening 16 00:00:29,000 --> 00:00:30,932 with JUnit as we go along and focus 17 00:00:30,932 --> 00:00:33,776 on JUnit itself, instead of devoting our brain cells 18 00:00:33,776 --> 00:00:36,758 to understanding some tricky, complex contrived code. 19 00:00:36,758 --> 00:00:38,840 By learning about JUnit in this way, by taking 20 00:00:38,840 --> 00:00:41,218 those easy to walk steps, you'll get good mastery 21 00:00:41,218 --> 00:00:43,364 of the core concepts which you can then apply 22 00:00:43,364 --> 00:00:45,212 to those complex pieces of code you want into 23 00:00:45,212 --> 00:00:47,060 testing your projects at a later date. 24 00:00:47,060 --> 00:00:49,184 But we have to understand the basics first. 25 00:00:49,184 --> 00:00:50,732 So let's jump in now and start 26 00:00:50,732 --> 00:00:52,535 writing some unit tests with JUnit.