1 00:00:00,540 --> 00:00:06,570 Unit testing helps you avoid bugs in this lesson, you're going to set up unit testing in visual studio 2 00:00:06,570 --> 00:00:06,990 code. 3 00:00:09,810 --> 00:00:11,940 Junior helps you write unit tests. 4 00:00:14,960 --> 00:00:17,300 The steps the setting up a unit are as follows. 5 00:00:17,600 --> 00:00:23,120 You're going to download the G-Unit Jar file because the Jar file contains all of the class files that 6 00:00:23,120 --> 00:00:25,190 make up the J Unit framework. 7 00:00:26,520 --> 00:00:28,800 And then you're in a AJ unit to vs code. 8 00:00:32,200 --> 00:00:37,720 So first up, download the G-Unit Jar file, it's inside of your resources folder to pause the video 9 00:00:37,720 --> 00:00:38,350 and download it. 10 00:00:44,170 --> 00:00:46,360 OK, then open up visual studio code. 11 00:00:47,990 --> 00:00:50,540 Mac users press command shift P. 12 00:00:51,140 --> 00:00:53,920 Windows users press control shift P. 13 00:00:55,490 --> 00:00:57,860 And then open settings that Jason. 14 00:01:01,020 --> 00:01:04,680 Settings that Jason is where you configure the settings of vs code. 15 00:01:05,280 --> 00:01:08,670 We're going to configure VSCO to use the G Unit framework. 16 00:01:11,560 --> 00:01:15,190 Followed by the comma copy, the source code from your resources folder. 17 00:01:27,920 --> 00:01:30,980 This code lets voice code reference a library. 18 00:01:39,270 --> 00:01:42,360 So right click on the jar file and paste the path over here. 19 00:02:30,300 --> 00:02:35,190 And now this code can navigate to this path and reference the J Unit framework. 20 00:02:42,090 --> 00:02:44,970 OK, now we need to test the library to make sure it works. 21 00:02:45,000 --> 00:02:47,190 I'm going to close Visual Studio code. 22 00:02:51,550 --> 00:02:52,810 And reopen it. 23 00:03:02,470 --> 00:03:04,450 And now it should have applied the changes. 24 00:03:05,230 --> 00:03:05,540 OK. 25 00:03:05,560 --> 00:03:06,580 Here's how to test it. 26 00:03:06,940 --> 00:03:07,840 Create a new file. 27 00:03:20,530 --> 00:03:23,020 And right, the test annotation. 28 00:03:26,600 --> 00:03:29,030 If it auto completes the import, then you're good. 29 00:03:34,430 --> 00:03:40,610 To recap, you imported the J Unit framework into V.S. Code, and now we can use J Unit to write unit 30 00:03:40,610 --> 00:03:41,450 tests.