public void TestTraktSeasonNotFoundExceptionBaseClass() { var exception = new TraktSeasonNotFoundException("", 1); exception.Should().BeAssignableTo <TraktShowNotFoundException>(); exception.Should().BeAssignableTo <TraktObjectNotFoundException>(); exception.Should().BeAssignableTo <TraktException>(); }
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(); }
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(); }
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(); }