1 00:00:00,000 --> 00:00:02,120 In this section, we're going to have a general 2 00:00:02,120 --> 00:00:04,856 overview of some key guidelines and best practices we 3 00:00:04,856 --> 00:00:07,390 should stick to when writing our unit tests. 4 00:00:07,390 --> 00:00:09,512 Now, at first, this stuff might not sound 5 00:00:09,512 --> 00:00:12,138 that important, but believe me, it really is. 6 00:00:12,139 --> 00:00:14,240 It's basically industry standard best 7 00:00:14,240 --> 00:00:16,232 practices distilled down over the years. 8 00:00:16,232 --> 00:00:18,092 So do please take it all in and always 9 00:00:18,092 --> 00:00:19,556 have it at the forefront of your mind when 10 00:00:19,556 --> 00:00:22,448 you're writing a unit tests. Without sticking to these 11 00:00:22,448 --> 00:00:25,389 basic principles, you'll be writing tests, sure, 12 00:00:25,389 --> 00:00:27,862 but they're not going to be good quality unit tests. 13 00:00:27,862 --> 00:00:29,732 The test could you write needs to be easy 14 00:00:29,732 --> 00:00:32,723 to work with, navigate, maintain, interpret, and run. 15 00:00:32,723 --> 00:00:34,928 The reason being that when you write good quality 16 00:00:34,928 --> 00:00:37,664 unit tests, you're assembling a safety net which will 17 00:00:37,664 --> 00:00:39,632 help you out in future and point you quickly 18 00:00:39,632 --> 00:00:41,420 to where errors are in production code. 19 00:00:41,420 --> 00:00:43,196 And you'll sleep better at night knowing your 20 00:00:43,196 --> 00:00:45,658 production code is fully tested and robust. 21 00:00:45,658 --> 00:00:47,264 So let's get into it now and 22 00:00:47,264 --> 00:00:49,530 explore the foundations of a unit testing.