public void Test_MovieCommentsRequest_Validate_Throws_Exceptions() { // id is null var request = new MovieCommentsRequest(); Action act = () => request.Validate(); act.Should().Throw <ArgumentNullException>(); // empty id request = new MovieCommentsRequest { Id = string.Empty }; act = () => request.Validate(); act.Should().Throw <ArgumentException>(); // id with spaces request = new MovieCommentsRequest { Id = "invalid id" }; act = () => request.Validate(); act.Should().Throw <ArgumentException>(); }
public async Task <ICommentsResponse> GetMovieComments(long movieId) { var request = new MovieCommentsRequest(); request.Lang = _culture; request.MovieId = movieId; var res = await request.ExecuteAsync(); return(res); }
public void Test_MovieCommentsRequest_Has_Valid_UriTemplate() { var request = new MovieCommentsRequest(); request.UriTemplate.Should().Be("movies/{id}/comments{/sort_order}{?page,limit}"); }