Example #1
0
        public void TestTraktEpisodeNotFoundExceptionBaseClass()
        {
            var exception = new TraktEpisodeNotFoundException("", 1, 1);

            exception.Should().BeAssignableTo <TraktSeasonNotFoundException>();
            exception.Should().BeAssignableTo <TraktShowNotFoundException>();
            exception.Should().BeAssignableTo <TraktObjectNotFoundException>();
            exception.Should().BeAssignableTo <TraktException>();
        }
        public void Test_TraktEpisodeNotFoundException_DefaultConstructor()
        {
            const string showId    = "show id";
            const uint   seasonNr  = 1U;
            const uint   episodeNr = 2U;

            var exception = new TraktEpisodeNotFoundException(showId, seasonNr, episodeNr);

            exception.Message.Should().Be("Episode Not Found - method exists, but no record found");
            exception.ObjectId.Should().Be(showId);
            exception.Season.Should().Be(seasonNr);
            exception.Episode.Should().Be(episodeNr);
            exception.StatusCode.Should().Be(HttpStatusCode.NotFound);
            exception.RequestUrl.Should().BeNullOrEmpty();
            exception.RequestBody.Should().BeNullOrEmpty();
            exception.Response.Should().BeNullOrEmpty();
        }
Example #3
0
        public void TestTraktEpisodeNotFoundExceptionDefaultConstructor()
        {
            var showId    = "show id";
            var seasonNr  = 1;
            var episodeNr = 2;

            var exception = new TraktEpisodeNotFoundException(showId, seasonNr, episodeNr);

            exception.Message.Should().Be("Episode Not Found - method exists, but no record found");
            exception.ObjectId.Should().Be(showId);
            exception.Season.Should().Be(seasonNr);
            exception.Episode.Should().Be(episodeNr);
            exception.StatusCode.Should().Be(System.Net.HttpStatusCode.NotFound);
            exception.RequestUrl.Should().BeNullOrEmpty();
            exception.RequestBody.Should().BeNullOrEmpty();
            exception.Response.Should().BeNullOrEmpty();
        }
        public void Test_TraktEpisodeNotFoundException_Constructor()
        {
            const string message   = "exception message";
            const string showId    = "show id";
            const uint   seasonNr  = 1U;
            const uint   episodeNr = 2U;

            var exception = new TraktEpisodeNotFoundException(message, showId, seasonNr, episodeNr);

            exception.Message.Should().Be(message);
            exception.ObjectId.Should().Be(showId);
            exception.Season.Should().Be(seasonNr);
            exception.Episode.Should().Be(episodeNr);
            exception.StatusCode.Should().Be(HttpStatusCode.NotFound);
            exception.RequestUrl.Should().BeNullOrEmpty();
            exception.RequestBody.Should().BeNullOrEmpty();
            exception.Response.Should().BeNullOrEmpty();
        }
Example #5
0
        public void TestTraktEpisodeNotFoundExceptionConstructor()
        {
            var message   = "exception message";
            var showId    = "show id";
            var seasonNr  = 1;
            var episodeNr = 2;

            var exception = new TraktEpisodeNotFoundException(message, showId, seasonNr, episodeNr);

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