1 00:00:00,000 --> 00:00:02,110 [No Audio] 2 00:00:02,110 --> 00:00:03,716 In this video, we're going to explore how we 3 00:00:03,716 --> 00:00:05,708 can actually use Arrange/ Act/ Assert, and we're going 4 00:00:05,708 --> 00:00:07,594 to actually write some test code in that format. 5 00:00:07,594 --> 00:00:09,656 So in other words, we're writing our first test case. 6 00:00:09,656 --> 00:00:11,972 Let's jump in now and see how we can do that together. 7 00:00:11,972 --> 00:00:14,905 Now, if I want to stick to my Arrange/ Act/ Assert 8 00:00:14,905 --> 00:00:18,005 I might say that a = 10 9 00:00:18,005 --> 00:00:20,518 [No Audio] 10 00:00:20,518 --> 00:00:21,759 B equals 20. 11 00:00:21,759 --> 00:00:26,850 [No Audio] 12 00:00:26,850 --> 00:00:28,450 result = 13 00:00:28,450 --> 00:00:31,668 [No Audio] 14 00:00:31,668 --> 00:00:33,850 Calculator 15 00:00:33,850 --> 00:00:37,083 .add a, b 16 00:00:37,083 --> 00:00:41,541 [No Audio] 17 00:00:41,541 --> 00:00:42,641 and my assertion might be 18 00:00:42,641 --> 00:00:44,632 [No Audio] 19 00:00:44,632 --> 00:00:48,670 so equals. I expected to be 30. 20 00:00:48,670 --> 00:00:51,050 [No Audio] 21 00:00:51,050 --> 00:00:53,033 I can pass in the actual result here. 22 00:00:53,033 --> 00:00:55,070 [No Audio] 23 00:00:55,070 --> 00:00:57,044 Notice that I can use the static import there 24 00:00:57,044 --> 00:00:58,964 as well, and just type assertEquals directly without 25 00:00:58,964 --> 00:01:00,742 having to prefix it with assert.. 26 00:01:00,742 --> 00:01:02,208 So if I run this now, 27 00:01:02,208 --> 00:01:05,441 [No Audio] 28 00:01:05,441 --> 00:01:08,184 that should pass, that's all well and good. So great. 29 00:01:08,184 --> 00:01:10,070 Now we know how to use Arrange/ Act/ Assert. 30 00:01:10,070 --> 00:01:12,640 You should be able to write test going forwards.