public void MakePostRequest_GivenValidDeletePath_CompletesSuccessfully() { var mockClient = MockClient.GetMockClient("testKey", "testSecret"); var mockApi = new Api(mockClient); var requestParams = new Dictionary <string, string> { { "video_key", "MEDIA_ID" }, }; var result = mockApi.PostRequest("/videos/delete", requestParams, true); Assert.Equal("Ok", result["status"]["message"]); Assert.Equal(200, result["status"]["code"]); }
public async void MakePostRequestAsync_GivenSpecialCharacters_CompletesSuccessfully() { var mockClient = MockClient.GetMockClient("testKey", "testSecret"); var mockApi = new Api(mockClient); var requestParams = new Dictionary <string, string> { { "video_key", "MEDIA_ID" }, { "special_characters", "te$t media&*" } }; var result = await mockApi.PostRequestAsync("/videos/delete", requestParams, true); Assert.Equal("Ok", result["status"]["message"]); Assert.Equal(200, result["status"]["code"]); }