-
-
Notifications
You must be signed in to change notification settings - Fork 14
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
2635352
commit c8ae4e6
Showing
3 changed files
with
71 additions
and
42 deletions.
There are no files selected for viewing
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
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,37 @@ | ||
using System; | ||
using System.Linq; | ||
using System.Threading.Tasks; | ||
using IGDB.Models; | ||
using Xunit; | ||
|
||
namespace IGDB.Tests | ||
{ | ||
public class Platforms | ||
{ | ||
IGDBClient _api; | ||
|
||
public Platforms() | ||
{ | ||
_api = new IGDB.IGDBClient( | ||
Environment.GetEnvironmentVariable("IGDB_CLIENT_ID"), | ||
Environment.GetEnvironmentVariable("IGDB_CLIENT_SECRET") | ||
); | ||
} | ||
|
||
[Fact] | ||
public async Task ShouldReturnResponseWithLogsVersionsAndReleaseDates() | ||
{ | ||
// Xbox 360 | ||
var plaforms = await _api.QueryAsync<Platform>(IGDBClient.Endpoints.Platforms, "fields *,platform_logo.*,versions.*,versions.platform_version_release_dates.*; where id = 12;"); | ||
|
||
Assert.NotNull(plaforms); | ||
|
||
var platform = plaforms[0]; | ||
|
||
Assert.NotNull(platform.PlatformLogo.Value); | ||
Assert.NotNull(platform.Versions.Values); | ||
Assert.True(platform.Versions.Values.Length > 0, "No versions found"); | ||
Assert.NotNull(platform.Versions.Values[1].PlatformVersionReleaseDates.Values); | ||
} | ||
} | ||
} |
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