diff --git a/IGDB.Tests/Games.cs b/IGDB.Tests/Games.cs index b680b2e..50e63b4 100644 --- a/IGDB.Tests/Games.cs +++ b/IGDB.Tests/Games.cs @@ -97,6 +97,69 @@ public async Task ShouldReturnResponseWithUnixTimestamp() Assert.NotNull(game.CreatedAt); Assert.True(game.CreatedAt.Value.Year > 1970); } + + [Fact] + public async Task ShouldReturnGameWithPortsBundlesRemastersAndExpandedGames() + { + var games = await _api.QueryAsync(IGDBClient.Endpoints.Games, "fields id,ports,bundles,remasters,expanded_games; where id = 358;"); + + Assert.NotNull(games); + + var game = games[0]; + + Assert.NotEmpty(game.Ports.Ids); + Assert.NotEmpty(game.Bundles.Ids); + Assert.NotEmpty(game.Remasters.Ids); + Assert.NotEmpty(game.ExpandedGames.Ids); + } + + [Fact] + public async Task ShouldReturnGameWithRemakes() + { + var games = await _api.QueryAsync(IGDBClient.Endpoints.Games, "fields id,remakes; where id = 974;"); + + Assert.NotNull(games); + + var game = games[0]; + + Assert.NotEmpty(game.Remakes.Ids); + } + + [Fact] + public async Task ShouldReturnGameWithExpansions() + { + var games = await _api.QueryAsync(IGDBClient.Endpoints.Games, "fields id,expansions; where id = 1939;"); + + Assert.NotNull(games); + + var game = games[0]; + + Assert.NotEmpty(game.Expansions.Ids); + } + + [Fact] + public async Task ShouldReturnGameWithStandaloneExpansions() + { + var games = await _api.QueryAsync(IGDBClient.Endpoints.Games, "fields id,standalone_expansions; where id = 14813;"); + + Assert.NotNull(games); + + var game = games[0]; + + Assert.NotEmpty(game.StandaloneExpansions.Ids); + } + + [Fact] + public async Task ShouldReturnGameWithDlc() + { + var games = await _api.QueryAsync(IGDBClient.Endpoints.Games, "fields id,dlcs; where id = 18968;"); + + Assert.NotNull(games); + + var game = games[0]; + + Assert.NotEmpty(game.Dlcs.Ids); + } [Fact] public async Task ShouldReturnGameCount() diff --git a/IGDB/Models/Game.cs b/IGDB/Models/Game.cs index 2a8011e..1e8b38c 100644 --- a/IGDB/Models/Game.cs +++ b/IGDB/Models/Game.cs @@ -31,7 +31,7 @@ public class Game : ITimestamps, IIdentifier, IHasChecksum public IdentitiesOrValues Dlcs { get; set; } - public IdentitiesOrValues Expandedgames { get; set; } + public IdentitiesOrValues ExpandedGames { get; set; } public IdentitiesOrValues Expansions { get; set; }