public void TestTraktMovieNotFoundExceptionBaseClass()
        {
            var exception = new TraktMovieNotFoundException("");

            exception.Should().BeAssignableTo <TraktException>();
            exception.Should().BeAssignableTo <TraktObjectNotFoundException>();
        }
示例#2
0
        public void Test_TraktMovieNotFoundException_DefaultConstructor()
        {
            const string movieId = "movie id";

            var exception = new TraktMovieNotFoundException(movieId);

            exception.Message.Should().Be("Movie Not Found - method exists, but no record found");
            exception.ObjectId.Should().Be(movieId);
            exception.StatusCode.Should().Be(HttpStatusCode.NotFound);
            exception.RequestUrl.Should().BeNullOrEmpty();
            exception.RequestBody.Should().BeNullOrEmpty();
            exception.Response.Should().BeNullOrEmpty();
        }
示例#3
0
        public void Test_TraktMovieNotFoundException_Constructor()
        {
            const string message = "exception message";
            const string movieId = "movie id";

            var exception = new TraktMovieNotFoundException(message, movieId);

            exception.Message.Should().Be(message);
            exception.ObjectId.Should().Be(movieId);
            exception.StatusCode.Should().Be(HttpStatusCode.NotFound);
            exception.RequestUrl.Should().BeNullOrEmpty();
            exception.RequestBody.Should().BeNullOrEmpty();
            exception.Response.Should().BeNullOrEmpty();
        }