public void Test_SearchIdLookupRequest_Validate_Throws_ArgumentException() { // id type is unspecified var request = new SearchIdLookupRequest { LookupId = "lookupId", IdType = TraktSearchIdType.Unspecified }; Action act = () => request.Validate(); act.Should().Throw <ArgumentException>(); // lookup id is empty request = new SearchIdLookupRequest { LookupId = string.Empty, IdType = TraktSearchIdType.Trakt }; act = () => request.Validate(); act.Should().Throw <ArgumentException>(); // lookup id contains spaces request = new SearchIdLookupRequest { LookupId = "lookup id", IdType = TraktSearchIdType.Trakt }; act = () => request.Validate(); act.Should().Throw <ArgumentException>(); }
public void Test_SearchIdLookupRequest_Validate_Throws_ArgumentNullException() { // no id type set var request = new SearchIdLookupRequest { LookupId = "lookupId" }; Action act = () => request.Validate(); act.Should().Throw <ArgumentNullException>(); // no lookup id set request = new SearchIdLookupRequest { IdType = TraktSearchIdType.Trakt }; act = () => request.Validate(); act.Should().Throw <ArgumentNullException>(); }
public void Test_SearchIdLookupRequest_Has_Valid_UriTemplate() { var request = new SearchIdLookupRequest(); request.UriTemplate.Should().Be("search/{id_type}/{id}{?type,extended,page,limit}"); }
public void Test_SearchIdLookupRequest_Has_AuthorizationRequirement_NotRequired() { var request = new SearchIdLookupRequest(); request.AuthorizationRequirement.Should().Be(AuthorizationRequirement.NotRequired); }