Skip to content

Commit

Permalink
Align index tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sliekens committed Sep 16, 2023
1 parent df68ee7 commit 0356d10
Show file tree
Hide file tree
Showing 64 changed files with 132 additions and 87 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace GuildWars2.Tests.Features.Achievements;
public class AchievementCategoriesIndex
{
[Fact]
public async Task Is_not_empty()
public async Task Can_be_listed()
{
var sut = Composer.Resolve<Gw2Client>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace GuildWars2.Tests.Features.Achievements;
public class AchievementGroupsIndex
{
[Fact]
public async Task Is_not_empty()
public async Task Can_be_listed()
{
var sut = Composer.Resolve<Gw2Client>();

Expand Down
2 changes: 1 addition & 1 deletion GW2SDK.Tests/Features/Achievements/AchievementsIndex.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace GuildWars2.Tests.Features.Achievements;
public class AchievementsIndex
{
[Fact]
public async Task Is_not_empty()
public async Task Can_be_listed()
{
var sut = Composer.Resolve<Gw2Client>();

Expand Down
2 changes: 1 addition & 1 deletion GW2SDK.Tests/Features/Achievements/TitlesIndex.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace GuildWars2.Tests.Features.Achievements;
public class TitlesIndex
{
[Fact]
public async Task Is_not_empty()
public async Task Can_be_listed()
{
var sut = Composer.Resolve<Gw2Client>();

Expand Down
6 changes: 4 additions & 2 deletions GW2SDK.Tests/Features/Armory/LegendaryItemsIndex.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ namespace GuildWars2.Tests.Features.Armory;
public class LegendaryItemsIndex
{
[Fact]
public async Task Is_not_empty()
public async Task Can_be_listed()
{
var sut = Composer.Resolve<Gw2Client>();

var actual = await sut.Armory.GetLegendaryItemsIndex();

Assert.Equal(actual.ResultContext.ResultTotal, actual.Value.Count);
Assert.NotEmpty(actual.Value);
Assert.Equal(actual.Value.Count, actual.ResultContext.ResultCount);
Assert.Equal(actual.Value.Count, actual.ResultContext.ResultTotal);
}
}
2 changes: 1 addition & 1 deletion GW2SDK.Tests/Features/Banking/MaterialCategoriesIndex.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace GuildWars2.Tests.Features.Banking;
public class MaterialCategoriesIndex
{
[Fact]
public async Task Is_not_empty()
public async Task Can_be_listed()
{
var sut = Composer.Resolve<Gw2Client>();

Expand Down
5 changes: 3 additions & 2 deletions GW2SDK.Tests/Features/BuildStorage/BuildStorageIndex.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@ namespace GuildWars2.Tests.Features.BuildStorage;
public class BuildStorageIndex
{
[Fact]
public async Task Is_not_empty()
public async Task Can_be_listed()
{
var sut = Composer.Resolve<Gw2Client>();
var accessToken = Composer.Resolve<ApiKey>();

var actual = await sut.BuildStorage.GetBuildStorageIndex(accessToken.Key);

Assert.NotEmpty(actual.Value);
Assert.Equal(actual.ResultContext.ResultTotal, actual.Value.Count);
Assert.Equal(actual.Value.Count, actual.ResultContext.ResultCount);
Assert.Equal(actual.Value.Count, actual.ResultContext.ResultTotal);
}
}
6 changes: 4 additions & 2 deletions GW2SDK.Tests/Features/Colors/ColorsIndex.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ namespace GuildWars2.Tests.Features.Colors;
public class ColorsIndex
{
[Fact]
public async Task Is_not_empty()
public async Task Can_be_listed()
{
var sut = Composer.Resolve<Gw2Client>();

var actual = await sut.Dyes.GetColorsIndex();

Assert.Equal(actual.ResultContext.ResultTotal, actual.Value.Count);
Assert.NotEmpty(actual.Value);
Assert.Equal(actual.Value.Count, actual.ResultContext.ResultCount);
Assert.Equal(actual.Value.Count, actual.ResultContext.ResultTotal);
}
}
6 changes: 4 additions & 2 deletions GW2SDK.Tests/Features/Commerce/Listings/OrderBooksIndex.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ namespace GuildWars2.Tests.Features.Commerce.Listings;
public class OrderBooksIndex
{
[Fact]
public async Task Is_not_empty()
public async Task Can_be_listed()
{
var sut = Composer.Resolve<Gw2Client>();

var actual = await sut.Commerce.GetOrderBooksIndex();

Assert.Equal(actual.ResultContext.ResultTotal, actual.Value.Count);
Assert.NotEmpty(actual.Value);
Assert.Equal(actual.Value.Count, actual.ResultContext.ResultCount);
Assert.Equal(actual.Value.Count, actual.ResultContext.ResultTotal);
}
}
6 changes: 4 additions & 2 deletions GW2SDK.Tests/Features/Commerce/Prices/ItemPricesIndex.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ namespace GuildWars2.Tests.Features.Commerce.Prices;
public class ItemPricesIndex
{
[Fact]
public async Task Is_not_empty()
public async Task Can_be_listed()
{
var sut = Composer.Resolve<Gw2Client>();

var actual = await sut.Commerce.GetItemPricesIndex();

Assert.Equal(actual.ResultContext.ResultTotal, actual.Value.Count);
Assert.NotEmpty(actual.Value);
Assert.Equal(actual.Value.Count, actual.ResultContext.ResultCount);
Assert.Equal(actual.Value.Count, actual.ResultContext.ResultTotal);
}
}
2 changes: 1 addition & 1 deletion GW2SDK.Tests/Features/Crafting/RecipesIndex.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace GuildWars2.Tests.Features.Crafting;
public class RecipesIndex
{
[Fact]
public async Task Is_not_empty()
public async Task Can_be_listed()
{
var sut = Composer.Resolve<Gw2Client>();

Expand Down
6 changes: 4 additions & 2 deletions GW2SDK.Tests/Features/Currencies/CurrenciesIndex.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ namespace GuildWars2.Tests.Features.Currencies;
public class CurrenciesIndex
{
[Fact]
public async Task Is_not_empty()
public async Task Can_be_listed()
{
var sut = Composer.Resolve<Gw2Client>();

var actual = await sut.Wallet.GetCurrenciesIndex();

Assert.Equal(actual.ResultContext.ResultTotal, actual.Value.Count);
Assert.NotEmpty(actual.Value);
Assert.Equal(actual.Value.Count, actual.ResultContext.ResultCount);
Assert.Equal(actual.Value.Count, actual.ResultContext.ResultTotal);
}
}
2 changes: 1 addition & 1 deletion GW2SDK.Tests/Features/Dungeons/DungeonsIndex.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace GuildWars2.Tests.Features.Dungeons;
public class DungeonsIndex
{
[Fact]
public async Task Is_not_empty()
public async Task Can_be_listed()
{
var sut = Composer.Resolve<Gw2Client>();

Expand Down
5 changes: 3 additions & 2 deletions GW2SDK.Tests/Features/Emblems/BackgroundEmblemsIndex.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@ namespace GuildWars2.Tests.Features.Emblems;
public class BackgroundEmblemsIndex
{
[Fact]
public async Task Is_not_empty()
public async Task Can_be_listed()
{
var sut = Composer.Resolve<Gw2Client>();

var actual = await sut.Emblems.GetBackgroundEmblemsIndex();

Assert.NotEmpty(actual.Value);
Assert.Equal(actual.ResultContext.ResultTotal, actual.Value.Count);
Assert.Equal(actual.Value.Count, actual.ResultContext.ResultCount);
Assert.Equal(actual.Value.Count, actual.ResultContext.ResultTotal);
}

}
5 changes: 3 additions & 2 deletions GW2SDK.Tests/Features/Emblems/ForegroundEmblemsIndex.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ namespace GuildWars2.Tests.Features.Emblems;
public class ForegroundEmblemsIndex
{
[Fact]
public async Task Is_not_empty()
public async Task Can_be_listed()
{
var sut = Composer.Resolve<Gw2Client>();

var actual = await sut.Emblems.GetForegroundEmblemsIndex();

Assert.NotEmpty(actual.Value);
Assert.Equal(actual.ResultContext.ResultTotal, actual.Value.Count);
Assert.Equal(actual.Value.Count, actual.ResultContext.ResultCount);
Assert.Equal(actual.Value.Count, actual.ResultContext.ResultTotal);
}
}
2 changes: 1 addition & 1 deletion GW2SDK.Tests/Features/Emotes/EmotesIndex.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace GuildWars2.Tests.Features.Emotes;
public class EmotesIndex
{
[Fact]
public async Task Is_not_empty()
public async Task Can_be_listed()
{
var sut = Composer.Resolve<Gw2Client>();

Expand Down
2 changes: 1 addition & 1 deletion GW2SDK.Tests/Features/Exploration/Charts/ChartsIndex.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class ChartsIndex
[InlineData(1, 0, 1)]
[InlineData(1, 0, 2)]
[InlineData(1, 0, 3)]
public async Task Is_not_empty(int continentId, int floorId, int regionId)
public async Task Can_be_listed(int continentId, int floorId, int regionId)
{
var sut = Composer.Resolve<Gw2Client>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace GuildWars2.Tests.Features.Exploration.Continents;
public class ContinentsIndex
{
[Fact]
public async Task Is_not_empty()
public async Task Can_be_listed()
{
var sut = Composer.Resolve<Gw2Client>();

Expand Down
2 changes: 1 addition & 1 deletion GW2SDK.Tests/Features/Exploration/Floors/FloorsIndex.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public class FloorsIndex
[Theory]
[InlineData(1)]
[InlineData(2)]
public async Task Is_not_empty(int continentId)
public async Task Can_be_listed(int continentId)
{
var sut = Composer.Resolve<Gw2Client>();

Expand Down
2 changes: 1 addition & 1 deletion GW2SDK.Tests/Features/Exploration/Hearts/HeartsIndex.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class HeartsIndex
[InlineData(1, 0, 1, 26)]
[InlineData(1, 0, 1, 27)]
[InlineData(1, 0, 1, 28)]
public async Task Is_not_empty(int continentId, int floorId, int regionId, int mapId)
public async Task Can_be_listed(int continentId, int floorId, int regionId, int mapId)
{
var sut = Composer.Resolve<Gw2Client>();

Expand Down
2 changes: 1 addition & 1 deletion GW2SDK.Tests/Features/Exploration/Maps/MapsIndex.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace GuildWars2.Tests.Features.Exploration.Maps;
public class MapsIndex
{
[Fact]
public async Task Is_not_empty()
public async Task Can_be_listed()
{
var sut = Composer.Resolve<Gw2Client>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class PointsOfInterestIndex
[InlineData(1, 0, 1, 26)]
[InlineData(1, 0, 1, 27)]
[InlineData(1, 0, 1, 28)]
public async Task Is_not_empty(int continentId, int floorId, int regionId, int mapId)
public async Task Can_be_listed(int continentId, int floorId, int regionId, int mapId)
{
var sut = Composer.Resolve<Gw2Client>();

Expand Down
2 changes: 1 addition & 1 deletion GW2SDK.Tests/Features/Exploration/Regions/RegionsIndex.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public class RegionsIndex
[Theory]
[InlineData(1, 0)]
[InlineData(2, 1)]
public async Task Is_not_empty(int continentId, int floorId)
public async Task Can_be_listed(int continentId, int floorId)
{
var sut = Composer.Resolve<Gw2Client>();

Expand Down
2 changes: 1 addition & 1 deletion GW2SDK.Tests/Features/Exploration/Sectors/SectorsIndex.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class SectorsIndex
[InlineData(1, 0, 1, 26)]
[InlineData(1, 0, 1, 27)]
[InlineData(1, 0, 1, 28)]
public async Task Is_not_empty(int continentId, int floorId, int regionId, int mapId)
public async Task Can_be_listed(int continentId, int floorId, int regionId, int mapId)
{
var sut = Composer.Resolve<Gw2Client>();

Expand Down
2 changes: 1 addition & 1 deletion GW2SDK.Tests/Features/Files/FilesIndex.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace GuildWars2.Tests.Features.Files;
public class FilesIndex
{
[Fact]
public async Task Is_not_empty()
public async Task Can_be_listed()
{
var sut = Composer.Resolve<Gw2Client>();

Expand Down
2 changes: 1 addition & 1 deletion GW2SDK.Tests/Features/Finishers/FinishersIndex.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace GuildWars2.Tests.Features.Finishers;
public class FinishersIndex
{
[Fact]
public async Task Is_not_empty()
public async Task Can_be_listed()
{
var sut = Composer.Resolve<Gw2Client>();

Expand Down
2 changes: 1 addition & 1 deletion GW2SDK.Tests/Features/Gliders/GlidersIndex.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace GuildWars2.Tests.Features.Gliders;
public class GlidersIndex
{
[Fact]
public async Task Is_not_empty()
public async Task Can_be_listed()
{
var sut = Composer.Resolve<Gw2Client>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace GuildWars2.Tests.Features.Guilds.Permissions;
public class GuildPermissionsIndex
{
[Fact]
public async Task Is_not_empty()
public async Task Can_be_listed()
{
var sut = Composer.Resolve<Gw2Client>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace GuildWars2.Tests.Features.Guilds.Upgrades;
public class GuildUpgradesIndex
{
[Fact]
public async Task Is_not_empty()
public async Task Can_be_listed()
{
var sut = Composer.Resolve<Gw2Client>();

Expand Down
7 changes: 5 additions & 2 deletions GW2SDK.Tests/Features/Home/CatsIndex.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,14 @@ namespace GuildWars2.Tests.Features.Home;
public class CatsIndex
{
[Fact]
public async Task Is_not_empty()
public async Task Can_be_listed()
{
var sut = Composer.Resolve<Gw2Client>();

var actual = await sut.Home.GetCatsIndex();

Assert.NotEmpty(actual.Value);
Assert.Equal(actual.ResultContext.ResultCount, actual.Value.Count);
Assert.Equal(actual.Value.Count, actual.ResultContext.ResultCount);
Assert.Equal(actual.Value.Count, actual.ResultContext.ResultTotal);
}
}
7 changes: 5 additions & 2 deletions GW2SDK.Tests/Features/Home/NodesIndex.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,14 @@ namespace GuildWars2.Tests.Features.Home;
public class NodesIndex
{
[Fact]
public async Task Is_not_empty()
public async Task Can_be_listed()
{
var sut = Composer.Resolve<Gw2Client>();

var actual = await sut.Home.GetNodesIndex();

Assert.NotEmpty(actual.Value);
Assert.Equal(actual.ResultContext.ResultCount, actual.Value.Count);
Assert.Equal(actual.Value.Count, actual.ResultContext.ResultCount);
Assert.Equal(actual.Value.Count, actual.ResultContext.ResultTotal);
}
}
6 changes: 4 additions & 2 deletions GW2SDK.Tests/Features/ItemStats/ItemStatsIndex.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ namespace GuildWars2.Tests.Features.ItemStats;
public class ItemStatsIndex
{
[Fact]
public async Task Is_not_empty()
public async Task Can_be_listed()
{
var sut = Composer.Resolve<Gw2Client>();

var actual = await sut.ItemStats.GetItemStatsIndex();

Assert.Equal(actual.ResultContext.ResultTotal, actual.Value.Count);
Assert.NotEmpty(actual.Value);
Assert.Equal(actual.Value.Count, actual.ResultContext.ResultCount);
Assert.Equal(actual.Value.Count, actual.ResultContext.ResultTotal);
}
}
6 changes: 4 additions & 2 deletions GW2SDK.Tests/Features/Items/ItemsIndex.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ namespace GuildWars2.Tests.Features.Items;
public class ItemsIndex
{
[Fact]
public async Task Is_not_empty()
public async Task Can_be_listed()
{
var sut = Composer.Resolve<Gw2Client>();

var actual = await sut.Items.GetItemsIndex();

Assert.Equal(actual.ResultContext.ResultTotal, actual.Value.Count);
Assert.NotEmpty(actual.Value);
Assert.Equal(actual.Value.Count, actual.ResultContext.ResultCount);
Assert.Equal(actual.Value.Count, actual.ResultContext.ResultTotal);
}
}
Loading

0 comments on commit 0356d10

Please sign in to comment.