コード例 #1
0
        public void TestTraktSeasonNotFoundExceptionBaseClass()
        {
            var exception = new TraktSeasonNotFoundException("", 1);

            exception.Should().BeAssignableTo <TraktShowNotFoundException>();
            exception.Should().BeAssignableTo <TraktObjectNotFoundException>();
            exception.Should().BeAssignableTo <TraktException>();
        }
コード例 #2
0
        public void Test_TraktSeasonNotFoundException_DefaultConstructor()
        {
            const string showId   = "show id";
            const uint   seasonNr = 1U;

            var exception = new TraktSeasonNotFoundException(showId, seasonNr);

            exception.Message.Should().Be("Season Not Found - method exists, but no record found");
            exception.ObjectId.Should().Be(showId);
            exception.Season.Should().Be(seasonNr);
            exception.StatusCode.Should().Be(HttpStatusCode.NotFound);
            exception.RequestUrl.Should().BeNullOrEmpty();
            exception.RequestBody.Should().BeNullOrEmpty();
            exception.Response.Should().BeNullOrEmpty();
        }
コード例 #3
0
        public void Test_TraktSeasonNotFoundException_Constructor()
        {
            const string message  = "exception message";
            const string showId   = "show id";
            const uint   seasonNr = 1U;

            var exception = new TraktSeasonNotFoundException(message, showId, seasonNr);

            exception.Message.Should().Be(message);
            exception.ObjectId.Should().Be(showId);
            exception.Season.Should().Be(seasonNr);
            exception.StatusCode.Should().Be(HttpStatusCode.NotFound);
            exception.RequestUrl.Should().BeNullOrEmpty();
            exception.RequestBody.Should().BeNullOrEmpty();
            exception.Response.Should().BeNullOrEmpty();
        }
コード例 #4
0
        public void TestTraktSeasonNotFoundExceptionConstructor()
        {
            var message  = "exception message";
            var showId   = "show id";
            var seasonNr = 1;

            var exception = new TraktSeasonNotFoundException(message, showId, seasonNr);

            exception.Message.Should().Be(message);
            exception.ObjectId.Should().Be(showId);
            exception.Season.Should().Be(seasonNr);
            exception.StatusCode.Should().Be(System.Net.HttpStatusCode.NotFound);
            exception.RequestUrl.Should().BeNullOrEmpty();
            exception.RequestBody.Should().BeNullOrEmpty();
            exception.Response.Should().BeNullOrEmpty();
        }