This video will give complete details about create, update and delete product api using POST and PUT request and POST and Delete request in restsharp library using specflow bdd framework.
00:00 Post and PUT request
13:22 Post and delete request
Feature and scenario content
Scenario: create and update product
Given enther the baseUrl as "https://testapi.jasonwatmore.com" and endpoint as "/products" for POST request
When add postbody to the request body and user sends POST request to the endpoint and capture the productID from the response
Then enther the endpoint as "/products/" for PUT request
When add putbody to the request body and user sends PUT request to the endpoint and verify the updated product name in the response body
Scenario: create and delete product
Given enther the baseUrl as "https://testapi.jasonwatmore.com" and endpoint as "/products" for POST request
When add postbody to the request body and user sends POST request to the endpoint and capture the productID from the response
Then enther the endpoint as "/products/" for DELETE request
When user sends DELETE request to the endpoint and verify the response status code as 200 and delete message "Product deleted"