public void Test_EpisodeListsRequest_Validate_Throws_Exceptions() { // id is null var request = new EpisodeListsRequest { EpisodeNumber = 1 }; Action act = () => request.Validate(); act.Should().Throw <ArgumentNullException>(); // empty id request = new EpisodeListsRequest { Id = string.Empty, EpisodeNumber = 1 }; act = () => request.Validate(); act.Should().Throw <ArgumentException>(); // id with spaces request = new EpisodeListsRequest { Id = "invalid id", EpisodeNumber = 1 }; act = () => request.Validate(); act.Should().Throw <ArgumentException>(); // episode number == 0 request = new EpisodeListsRequest { EpisodeNumber = 0 }; act = () => request.Validate(); act.Should().Throw <ArgumentException>(); }
public void Test_EpisodeListsRequest_Has_Valid_UriTemplate() { var request = new EpisodeListsRequest(); request.UriTemplate.Should().Be("shows/{id}/seasons/{season}/episodes/{episode}/lists{/type}{/sort_order}{?page,limit}"); }