Ejemplo n.º 1
0
        public void Test_ShowRelatedShowsRequest_Validate_Throws_Exceptions()
        {
            // id is null
            var request = new ShowRelatedShowsRequest();

            Action act = () => request.Validate();

            act.Should().Throw <ArgumentNullException>();

            // empty id
            request = new ShowRelatedShowsRequest {
                Id = string.Empty
            };

            act = () => request.Validate();
            act.Should().Throw <ArgumentException>();

            // id with spaces
            request = new ShowRelatedShowsRequest {
                Id = "invalid id"
            };

            act = () => request.Validate();
            act.Should().Throw <ArgumentException>();
        }
Ejemplo n.º 2
0
        public void Test_ShowRelatedShowsRequest_Has_Valid_UriTemplate()
        {
            var request = new ShowRelatedShowsRequest();

            request.UriTemplate.Should().Be("shows/{id}/related{?extended,page,limit}");
        }