Skip to content
This repository was archived by the owner on Mar 16, 2025. It is now read-only.

Commit f3c4e5b

Browse files
Merge pull request #231 from henrikfroehling/merge/release-1.1.0/GH-224
Resolves GH-224
2 parents cb7d748 + fa8f999 commit f3c4e5b

12 files changed

+0
-173
lines changed

Source/Lib/Trakt.NET/Requests/Calendars/ACalendarRequest'1.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@ public override IDictionary<string, object> GetUriPathParameters()
4949

5050
public override void Validate()
5151
{
52-
if (Days.HasValue && (Days.Value < 1 || Days.Value > 31))
53-
throw new ArgumentOutOfRangeException(nameof(Days), "days must have a value between 1 and 31");
5452
}
5553
}
5654
}

Source/Tests/Trakt.NET.Modules.Tests/TraktCalendarModule/TraktCalendarModuleTests_GetAllDVDMovies_Tests.cs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -352,19 +352,5 @@ public async Task Test_TraktCalendarModule_GetAllDVDMovies_Throws_API_Exception(
352352
(exception.GetType() == exceptionType).Should().BeTrue();
353353
}
354354
}
355-
356-
[Fact]
357-
public void Test_TraktCalendarModule_GetAllDVDMovies_ArgumentExceptions()
358-
{
359-
TraktClient client = TestUtility.GetMockClient(GET_ALL_DVD_MOVIES_URI,
360-
CALENDAR_DVD_MOVIES_JSON,
361-
startDate: START_DATE, endDate: END_DATE);
362-
363-
Func<Task<TraktListResponse<ITraktCalendarMovie>>> act = () => client.Calendar.GetAllDVDMoviesAsync(null, 0);
364-
act.Should().Throw<ArgumentOutOfRangeException>();
365-
366-
act = () => client.Calendar.GetAllDVDMoviesAsync(null, 32);
367-
act.Should().Throw<ArgumentOutOfRangeException>();
368-
}
369355
}
370356
}

Source/Tests/Trakt.NET.Modules.Tests/TraktCalendarModule/TraktCalendarModuleTests_GetAllMovies_Tests.cs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -352,19 +352,5 @@ public async Task Test_TraktCalendarModule_GetAllMovies_Throws_API_Exception(Htt
352352
(exception.GetType() == exceptionType).Should().BeTrue();
353353
}
354354
}
355-
356-
[Fact]
357-
public void Test_TraktCalendarModule_GetAllMovies_ArgumentExceptions()
358-
{
359-
TraktClient client = TestUtility.GetMockClient(GET_ALL_MOVIES_URI,
360-
CALENDAR_ALL_MOVIES_JSON,
361-
startDate: START_DATE, endDate: END_DATE);
362-
363-
Func<Task<TraktListResponse<ITraktCalendarMovie>>> act = () => client.Calendar.GetAllMoviesAsync(null, 0);
364-
act.Should().Throw<ArgumentOutOfRangeException>();
365-
366-
act = () => client.Calendar.GetAllMoviesAsync(null, 32);
367-
act.Should().Throw<ArgumentOutOfRangeException>();
368-
}
369355
}
370356
}

Source/Tests/Trakt.NET.Modules.Tests/TraktCalendarModule/TraktCalendarModuleTests_GetAllNewShows_Tests.cs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -352,19 +352,5 @@ public async Task Test_TraktCalendarModule_GetAllNewShows_Throws_API_Exception(H
352352
(exception.GetType() == exceptionType).Should().BeTrue();
353353
}
354354
}
355-
356-
[Fact]
357-
public void Test_TraktCalendarModule_GetAllNewShows_ArgumentExceptions()
358-
{
359-
TraktClient client = TestUtility.GetMockClient($"{GET_ALL_NEW_SHOWS_URI}",
360-
CALENDAR_ALL_SHOWS_JSON,
361-
startDate: START_DATE, endDate: END_DATE);
362-
363-
Func<Task<TraktListResponse<ITraktCalendarShow>>> act = () => client.Calendar.GetAllNewShowsAsync(null, 0);
364-
act.Should().Throw<ArgumentOutOfRangeException>();
365-
366-
act = () => client.Calendar.GetAllNewShowsAsync(null, 32);
367-
act.Should().Throw<ArgumentOutOfRangeException>();
368-
}
369355
}
370356
}

Source/Tests/Trakt.NET.Modules.Tests/TraktCalendarModule/TraktCalendarModuleTests_GetAllSeasonPremieres_Tests.cs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -352,19 +352,5 @@ public async Task Test_TraktCalendarModule_GetAllSeasonPremieres_Throws_API_Exce
352352
(exception.GetType() == exceptionType).Should().BeTrue();
353353
}
354354
}
355-
356-
[Fact]
357-
public void Test_TraktCalendarModule_GetAllSeasonPremieres_ArgumentExceptions()
358-
{
359-
TraktClient client = TestUtility.GetMockClient(GET_ALL_SEASON_PREMIERES_URI,
360-
CALENDAR_ALL_SHOWS_JSON,
361-
startDate: START_DATE, endDate: END_DATE);
362-
363-
Func<Task<TraktListResponse<ITraktCalendarShow>>> act = () => client.Calendar.GetAllSeasonPremieresAsync(null, 0);
364-
act.Should().Throw<ArgumentOutOfRangeException>();
365-
366-
act = () => client.Calendar.GetAllSeasonPremieresAsync(null, 32);
367-
act.Should().Throw<ArgumentOutOfRangeException>();
368-
}
369355
}
370356
}

Source/Tests/Trakt.NET.Modules.Tests/TraktCalendarModule/TraktCalendarModuleTests_GetAllShows_Tests.cs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -352,19 +352,5 @@ public async Task Test_TraktCalendarModule_GetAllShows_Throws_API_Exception(Http
352352
(exception.GetType() == exceptionType).Should().BeTrue();
353353
}
354354
}
355-
356-
[Fact]
357-
public void Test_TraktCalendarModule_GetAllShows_ArgumentExceptions()
358-
{
359-
TraktClient client = TestUtility.GetMockClient(GET_ALL_SHOWS_URI,
360-
CALENDAR_ALL_SHOWS_JSON,
361-
startDate: START_DATE, endDate: END_DATE);
362-
363-
Func<Task<TraktListResponse<ITraktCalendarShow>>> act = () => client.Calendar.GetAllShowsAsync(null, 0);
364-
act.Should().Throw<ArgumentOutOfRangeException>();
365-
366-
act = () => client.Calendar.GetAllShowsAsync(null, 32);
367-
act.Should().Throw<ArgumentOutOfRangeException>();
368-
}
369355
}
370356
}

Source/Tests/Trakt.NET.Modules.Tests/TraktCalendarModule/TraktCalendarModuleTests_GetUserDVDMovies_Tests.cs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -352,19 +352,5 @@ public async Task Test_TraktCalendarModule_GetUserDVDMovies_Throws_API_Exception
352352
(exception.GetType() == exceptionType).Should().BeTrue();
353353
}
354354
}
355-
356-
[Fact]
357-
public void Test_TraktCalendarModule_GetUserDVDMovies_ArgumentExceptions()
358-
{
359-
TraktClient client = TestUtility.GetOAuthMockClient(GET_USER_DVD_MOVIES_URI,
360-
CALENDAR_DVD_MOVIES_JSON,
361-
startDate: START_DATE, endDate: END_DATE);
362-
363-
Func<Task<TraktListResponse<ITraktCalendarMovie>>> act = () => client.Calendar.GetUserDVDMoviesAsync(null, 0);
364-
act.Should().Throw<ArgumentOutOfRangeException>();
365-
366-
act = () => client.Calendar.GetUserDVDMoviesAsync(null, 32);
367-
act.Should().Throw<ArgumentOutOfRangeException>();
368-
}
369355
}
370356
}

Source/Tests/Trakt.NET.Modules.Tests/TraktCalendarModule/TraktCalendarModuleTests_GetUserMovies_Tests.cs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -352,19 +352,5 @@ public async Task Test_TraktCalendarModule_GetUserMovies_Throws_API_Exception(Ht
352352
(exception.GetType() == exceptionType).Should().BeTrue();
353353
}
354354
}
355-
356-
[Fact]
357-
public void Test_TraktCalendarModule_GetUserMovies_ArgumentExceptions()
358-
{
359-
TraktClient client = TestUtility.GetOAuthMockClient(GET_USER_MOVIES_URI,
360-
CALENDAR_ALL_MOVIES_JSON,
361-
startDate: START_DATE, endDate: END_DATE);
362-
363-
Func<Task<TraktListResponse<ITraktCalendarMovie>>> act = () => client.Calendar.GetUserMoviesAsync(null, 0);
364-
act.Should().Throw<ArgumentOutOfRangeException>();
365-
366-
act = () => client.Calendar.GetUserMoviesAsync(null, 32);
367-
act.Should().Throw<ArgumentOutOfRangeException>();
368-
}
369355
}
370356
}

Source/Tests/Trakt.NET.Modules.Tests/TraktCalendarModule/TraktCalendarModuleTests_GetUserNewShows_Tests.cs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -352,19 +352,5 @@ public async Task Test_TraktCalendarModule_GetUserNewShows_Throws_API_Exception(
352352
(exception.GetType() == exceptionType).Should().BeTrue();
353353
}
354354
}
355-
356-
[Fact]
357-
public void Test_TraktCalendarModule_GetUserNewShows_ArgumentExceptions()
358-
{
359-
TraktClient client = TestUtility.GetOAuthMockClient(GET_USER_NEW_SHOWS_URI,
360-
CALENDAR_ALL_SHOWS_JSON,
361-
startDate: START_DATE, endDate: END_DATE);
362-
363-
Func<Task<TraktListResponse<ITraktCalendarShow>>> act = () => client.Calendar.GetUserNewShowsAsync(null, 0);
364-
act.Should().Throw<ArgumentOutOfRangeException>();
365-
366-
act = () => client.Calendar.GetUserNewShowsAsync(null, 32);
367-
act.Should().Throw<ArgumentOutOfRangeException>();
368-
}
369355
}
370356
}

Source/Tests/Trakt.NET.Modules.Tests/TraktCalendarModule/TraktCalendarModuleTests_GetUserSeasonPremieres_Tests.cs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -352,19 +352,5 @@ public async Task Test_TraktCalendarModule_GetUserSeasonPremieres_Throws_API_Exc
352352
(exception.GetType() == exceptionType).Should().BeTrue();
353353
}
354354
}
355-
356-
[Fact]
357-
public void Test_TraktCalendarModule_GetUserSeasonPremieres_ArgumentExceptions()
358-
{
359-
TraktClient client = TestUtility.GetOAuthMockClient(GET_USER_SEASON_PREMIERES_URI,
360-
CALENDAR_ALL_SHOWS_JSON,
361-
startDate: START_DATE, endDate: END_DATE);
362-
363-
Func<Task<TraktListResponse<ITraktCalendarShow>>> act = () => client.Calendar.GetUserSeasonPremieresAsync(null, 0);
364-
act.Should().Throw<ArgumentOutOfRangeException>();
365-
366-
act = () => client.Calendar.GetUserSeasonPremieresAsync(null, 32);
367-
act.Should().Throw<ArgumentOutOfRangeException>();
368-
}
369355
}
370356
}

0 commit comments

Comments
 (0)