public void TC_02_AssertActionPOSTApiValuesByID_OK(string tesCaseName, string resourcePath, HttpStatusCode expectedResult) { //Arrange uriBuilder.Path = resourcePath; var paramsBody = RetrieveTestData.GetRequestParameters(scenarioContext.BaseEnvironmentObj["testDataPath"]["filePath"].ToString(), tesCaseName); //Act var response = _httpPostRequest.MakePostRequet(uriBuilder, paramsBody); //Assert Assert.Equal(expectedResult, response.StatusCode); }
public void TC_07_AssertReturnedData(string testCaseName, string resourcePath) { //Arrange uriBuilder.Path = resourcePath; var expectedObj = RetrieveTestData.GetRequestParameters <ParamsBodyTest>(scenarioContext.BaseEnvironmentObj["testDataPath"]["filePath"].ToString(), testCaseName); //Act var response = _httpGetRequest.MakeGetRequest(uriBuilder, HttpMethod.GET); //Assert var result = ResponseContentAssertions.AssertResponseDataObject <ParamsBodyTest>(response, expectedObj); Assert.True(result); }