‫Hello, guys.
‫Nice to see you today at our new lesson.
‫Today we will create automated tests for web it possible for delete the board request and there are
‫sharp.
‫Here is our agenda for today.
‫We will edit test scores for the leaderboard and put create a new board before each test run verified
‫response status got in the body.
‫Verified removed board doesn't exist in the board storage anymore.
‫Let's switch to our test framework to proceed with creation of new tests.
‫First, let's imagine the floor we should do to perform heavy parts for delete the board endpoint.
‫The starting point here will be the existence of some board that we will delete.
‫If you remember, we already have two static boards in our workspace.
‫The first one is for boards.
‫Name of the.
‫Well, the second one is to check the board, its name correctness and should not be changed.
‫If we delete one of our static boards, the remaining test will fail.
‫If you create additional static board, we will remove it during the first test run and cannot use it
‫for our future test.
‫That means that we should create a new create board.
‫Each time that the leaderboard people start to started.
‫Then we should remember the idea for creative work and use it inside our daily to make that call.
‫Finally, we should check that our get all bulletin end point doesn't contain the created the border
‫tidy inside of one of the test board.
‫It looks like a complete purification for.
‫No.
‫You should start cutting by itself.
‫First, they should created this class where my validation test will be stored.
‫To do so, I should create a separate directory where all the tests glosses for the delete endpoint
‫will be stored.
‫I create a folder with named delete inside our test directory.
‫Then here it was with name.
‫Delete, abort test.
‫The following step will be to add semicolon based test line of code directly after the class declaration.
‫After this.
‫My onetime set up hook will be called before all this method and this class and request was automated
‫could be accessed from anyplace in this quest as well.
‫Then I should create a field where the value for creating the board will be stored.
‫Let's add the following line of code.
‫Here's the first one in our quest.
‫Private string underscore created both Heidi.
‫The following step will be to implement logic grade in our test board for delete in where the underscore
‫created rated board tidy wearables where we will be assigned.
‫As I don't want this logic to overlap with my death method by itself.
‫I will place it in a separate before death talk.
‫If you remember in junior three, this hook is called this set up to implement such a hook and therefore
‫we might adhere.
‫Public void.
‫Create bold.
‫Then I will set up a tribute right above this whole declaration.
‫The methods implementation will look like the following var request equals request with auth more 10.038
‫board zero.
‫Then I met Doyle at the Jason.
‫The body met at school right after this.
‫While, of course.
‫After this I put new dictionary whiskey and value string as the incoming parameter for this method.
‫Then I will add the following Q was name, name and my pin or this key equal to string to name Newport.
‫Then I will add a separate variable where the response will be stored.
‫It will look like the following.
‫Well, responds client note post in the pass request is the incoming parameter here to send the SDP
‫request for board creation.
‫I will add the following Great Board idea in your solution logic.
‫Underscore created bought idea equals j token the path with the following income and parameter.
‫Response that content.
‫Which will transform our response to the instance of a token.
‫After this, I need to access the idea of created war from our response, with the help of the following
‫quote.
‫But select token I.D. not to streak so it will you can live streamed.
‫After we have created more tidy variables where we is signed, we can proceed to a statement creation
‫by itself.
‫To do so, I should add the following line of code.
‫Public void.
‫Check the leaderboard.
‫After this.
‫I shouldn't forget to distribute right above.
‫Eat.
‫The following step will be to implement this method.
‫To do so I should call delete board pinpoint which created the board I.D. plus s the path parameter.
‫It will look like the following.
‫Well, our request.
‫Equals request with oath and pass here.
‫Board Endpoints note delete board euro as the income parameter.
‫Well then I put those at euro segment in pass idea string ASCII and underscore created more idea field
‫as the value.
‫Then I will add the four women were able to store the value of my response.
‫Var responds equals underscore client not delete write sharps method with the value pass this request.
‫The following step would be to assert the status quo and request body.
‫To do so, I will add the following line of code.
‫Assault not are equal.
‫With SDP state squad.
‫Not okay as expected result.
‫And the response, not the status quo.
‫Here's the actual one.
‫Then I remember the response was this request execution has body.
‫I can easily assorted.
‫So why shouldn't I do it?
‫This will look like.
‫Very simple.
‫I thought that our equal streak both MTA his expected one and the book in the part was respond that
‫content.
‫The select token was underscore value, not the string as the actual value here.
‫The final call we should make in this class is to assert that the world was created before our test
‫run.
‫He's factually removed from all the world, at least.
‫To do so I should use guitar boards and board.
‫If you remember, we already defined this request logic in one of our test classes.
‫I believe we get to see squares whose names create more taste and copy.
‫The similar request definition from method was named Chick Grade Board.
‫Then I will go back to my previous discourse.
‫Hint please the copy the value has the final statement in white this method.
‫The show shown here will look like the fall of the.
‫Well, I thought that false, since we need almost the same assertion that was done for work creation.
‫But in this case which echoes at the border, we edit before he's completely removed from our API.
‫It is pretty bitter both.
‫Since we simply can't understand from this first glance that our response body should not contain any
‫item where the i.t. field value is equal to the value of our created bought i.t.
‫Looks like we have set up our delete board together.
‫The final step here will be to run all the tests and see how they work.
‫You can see that the test in this class is green and works as expected.
‫Let's sum up what we did today.
‫Today we learned the following.
‫It would be possible both for the leaderboard trails End Point.
‫Created board before each the throne sugar sponsors body and state escort send ghetto boy to the questions
‫his method.
‫So that the board doesn't think this.
‫Why is this endpoint?
‫Did this ever.
‫You know what they got for you for today?
‫I hope this was interesting for you to create a high bypass flow test for the little request with me.
‫Your home task will be to create automated test for delete cart and point in trailer.
‫What you should do is store new cards.
‫I.D. in test glasses field.
‫Generate new cars before each daily test check underscore where you bought it from and of quote in the
‫respond.
‫Sent.
‫Get all card requests.
‫Verify a new card is removed in the response.
‫During our next lesson we will add validation test for delete abort endpoint.
‫Jessica for your attention.
‫See you in the next lesson.