public async Task SearchAsync_Null_ShouldThrowArgumentNullException(string emptyString) { //Arrange IClient client = _clientMock.Object; IApiKeyConfiguration apiKeyConfiguration = _apiKeyConfigurationMock.Object; MovieRepo repo = new MovieRepo(client, apiKeyConfiguration); //Act Func <Task> action = async() => await repo.SearchAsync(emptyString); //Assert await Assert.ThrowsAsync <ArgumentException>(action); }
public async Task SearchAsync_ValidSearch_ShouldReturnListOfMovies(string query) { //Arrange IClient client = _clientMock.Object; IApiKeyConfiguration apiKeyConfiguration = _apiKeyConfigurationMock.Object; MovieRepo repo = new MovieRepo(client, apiKeyConfiguration); //Act var result = await repo.SearchAsync(query); //Assert Assert.NotNull(result); }