public void CalculateSecretUsingImdbMovieIdOutOfRangeThrowsArgumentOutOfRangeException(int invalidImdbMovieId) { // Arrange var moviePosterDbService = new MoviePosterDbService(ApiKey, ApiSecret); // Act // Assert Assert.Throws<ArgumentOutOfRangeException>(() => moviePosterDbService.CalculateSecret(invalidImdbMovieId)); }
public void CalculateSecretUsingNullImdbMovieUrlThrowsArgumentNullException() { // Arrange Uri nullImdbMovieUrl = null; var moviePosterDbService = new MoviePosterDbService(ApiKey, ApiSecret); // Act // Assert Assert.Throws<ArgumentNullException>(() => moviePosterDbService.CalculateSecret(nullImdbMovieUrl)); }
public void CalculateSecretUsingInvalidImdbUrlThrowsArgumentException(string invalidImdbMovieUrl) { // Arrange var moviePosterDbService = new MoviePosterDbService(ApiKey, ApiSecret); // Act // Assert Assert.Throws<ArgumentException>(() => moviePosterDbService.CalculateSecret(new Uri(invalidImdbMovieUrl))); }
public void CalculateSecretUsingImdbMovieUrlReturnsCorrectSecret(string imdbMovieUrl) { // Arrange var moviePosterDbService = new MoviePosterDbService(ApiKey, ApiSecret); // Act var calculateSecret = moviePosterDbService.CalculateSecret(new Uri(imdbMovieUrl)); // Assert Assert.Equal("8435ce4c53ff", calculateSecret); }