‫Hello, guys.
‫Nice to see you today at our annual lesson.
‫Today, we will use a solution for our do eat method bypass with the help of fresh out of home task
‫force.
‫Let's remember what our home does.
‫You should create automated test for delete cart, end point and Trello.
‫What you should do is the following store storing your cart ID in test glasses field.
‫Create a new card before each delete test run.
‫Check underscore value body serum in status quad in response.
‫Since the get old card request verifies that new card is removed in response.
‫This is always a solution for the home, but looks like we should switch to our code editor first.
‫Here in the project window you can find that I added one more folder with name delete in each dorm.
‫This folder has an internal question.
‫Name do it.
‫Guard test.
‫Let's we get inside this S-Class and see how it looks like from inside.
‫First we can absorb this class is descendant of Bass First Class, which has done to inherit its onetime
‫set of hooks behavior and all the possible base method access.
‫Also, this class has one private field whose name created the card I.D., as you can understand.
‫Here we are going to store the idea of card we create in some precondition step to remove it a bit later
‫inside the business logic test by itself.
‫A bit below the shield declaration.
‫We have a set up who defined its name, its credit card.
‫Inside this hook, I initialize our credit card I.D. for you.
‫It is initialized with the help of refer to create card and point in the request body past the existing
‫list I.D. and you can name with the as new card string.
‫Please note that the value of it if created bought is extracted with the help of JSON partner information
‫of our response and referral to idea property of the responses item.
‫The following matter we have in this discourse is the best method by itself.
‫Its name is checked the ID card, and the test is marked with best attribute.
‫Here I refer to a request with automated and path parameter with GSI and available as greeted card.
‫I reviewed the value.
‫Then I call the rest sharp delete method that goes to delete abort URL constant.
‫After this, I transform my response into g block into response object with the help of path method
‫goal.
‫After this, I ensure that the response status code is okay.
‫After a while, I verify that the response body has an item with underscore value and the value equal
‫to now.
‫Please note that such a behavior is expected according to the Trellis API documentation we observed
‫in the post months part of this course.
‫The final part of this test method is verifications at the least.
‫Where we edit our test card doesn't contain any remnants of our item.
‫The result I refer to already well known for our get all cards and board.
‫Their IPOs.
‫My existing list idea is the posterior parameter.
‫On the eighth after this month of execution, I expect that there will be no error item in the response
‫body where its field whiskey idea will match the value of my assigned created card I reviewed.
‫As you can see, recovery toward card deletion of workflow with the help of automated test.
‫Now it is time to run the test and see how it behaves.
‫As you can see, it is marked as a past one in the test result window.
‫Please know that all the requirements for this home task are fulfilled.
‫That is everything they got for you for today.
‫I hope that this was interesting for you to observe this solution for automated test creation for delete
‫cart and point in rest shop with me.
‫Thank you for your attention.
‫See you in our next lesson.