-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5cfa348
commit aa0aaa0
Showing
5 changed files
with
93 additions
and
0 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
Source/Lib/Trakt.NET/Requests/Countries/ACountriesRequest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
namespace TraktNet.Requests.Countries | ||
{ | ||
using Base; | ||
using Objects.Basic; | ||
using System.Collections.Generic; | ||
|
||
internal abstract class ACountriesRequest : AGetRequest<ITraktCountry> | ||
{ | ||
public override IDictionary<string, object> GetUriPathParameters() => new Dictionary<string, object>(); | ||
|
||
public override void Validate() { } | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
Source/Lib/Trakt.NET/Requests/Countries/CountriesMoviesRequest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
namespace TraktNet.Requests.Countries | ||
{ | ||
internal sealed class CountriesMoviesRequest : ACountriesRequest | ||
{ | ||
public override string UriTemplate => "countries/movies"; | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
Source/Lib/Trakt.NET/Requests/Countries/CountriesShowsRequest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
namespace TraktNet.Requests.Countries | ||
{ | ||
internal sealed class CountriesShowsRequest : ACountriesRequest | ||
{ | ||
public override string UriTemplate => "countries/shows"; | ||
} | ||
} |
33 changes: 33 additions & 0 deletions
33
Source/Tests/Trakt.NET.Requests.Tests/Countries/CountriesMoviesRequest_Tests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
namespace Trakt.NET.Requests.Tests.Countries | ||
{ | ||
using FluentAssertions; | ||
using Trakt.NET.Tests.Utility.Traits; | ||
using TraktNet.Requests.Base; | ||
using TraktNet.Requests.Countries; | ||
using Xunit; | ||
|
||
[Category("Requests.Countries")] | ||
public class CountriesMoviesRequest_Tests | ||
{ | ||
[Fact] | ||
public void Test_CountriesMoviesRequest_Has_AuthorizationRequirement_NotRequired() | ||
{ | ||
var request = new CountriesMoviesRequest(); | ||
request.AuthorizationRequirement.Should().Be(AuthorizationRequirement.NotRequired); | ||
} | ||
|
||
[Fact] | ||
public void Test_CountriesMoviesRequest_Has_Valid_UriTemplate() | ||
{ | ||
var request = new CountriesMoviesRequest(); | ||
request.UriTemplate.Should().Be("countries/movies"); | ||
} | ||
|
||
[Fact] | ||
public void Test_CountriesMoviesRequest_Returns_Valid_UriPathParameters() | ||
{ | ||
var request = new CountriesMoviesRequest(); | ||
request.GetUriPathParameters().Should().NotBeNull().And.HaveCount(0); | ||
} | ||
} | ||
} |
33 changes: 33 additions & 0 deletions
33
Source/Tests/Trakt.NET.Requests.Tests/Countries/CountriesShowsRequest_Tests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
namespace Trakt.NET.Requests.Tests.Countries | ||
{ | ||
using FluentAssertions; | ||
using Trakt.NET.Tests.Utility.Traits; | ||
using TraktNet.Requests.Base; | ||
using TraktNet.Requests.Countries; | ||
using Xunit; | ||
|
||
[Category("Requests.Countries")] | ||
public class CountriesShowsRequest_Tests | ||
{ | ||
[Fact] | ||
public void Test_CountriesShowsRequest_Has_AuthorizationRequirement_NotRequired() | ||
{ | ||
var request = new CountriesShowsRequest(); | ||
request.AuthorizationRequirement.Should().Be(AuthorizationRequirement.NotRequired); | ||
} | ||
|
||
[Fact] | ||
public void Test_CountriesShowsRequest_Has_Valid_UriTemplate() | ||
{ | ||
var request = new CountriesShowsRequest(); | ||
request.UriTemplate.Should().Be("countries/shows"); | ||
} | ||
|
||
[Fact] | ||
public void Test_CountriesShowsRequest_Returns_Valid_UriPathParameters() | ||
{ | ||
var request = new CountriesShowsRequest(); | ||
request.GetUriPathParameters().Should().NotBeNull().And.HaveCount(0); | ||
} | ||
} | ||
} |