public void TestTraktMovieNotFoundExceptionBaseClass() { var exception = new TraktMovieNotFoundException(""); exception.Should().BeAssignableTo <TraktException>(); exception.Should().BeAssignableTo <TraktObjectNotFoundException>(); }
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(); }
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(); }