-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
6 changed files
with
90 additions
and
66 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using System.Threading.Tasks; | ||
using GuildWars2.Tests.TestInfrastructure; | ||
using Xunit; | ||
|
||
namespace GuildWars2.Tests.Features.Skins; | ||
|
||
public class SkinById | ||
{ | ||
[Fact] | ||
public async Task Can_be_found() | ||
{ | ||
var sut = Composer.Resolve<Gw2Client>(); | ||
|
||
const int id = 1; | ||
|
||
var actual = await sut.Wardrobe.GetSkinById(id); | ||
|
||
Assert.Equal(id, actual.Value.Id); | ||
} | ||
} |
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,31 @@ | ||
using System.Collections.Generic; | ||
using System.Threading.Tasks; | ||
using GuildWars2.Tests.TestInfrastructure; | ||
using Xunit; | ||
|
||
namespace GuildWars2.Tests.Features.Skins; | ||
|
||
public class SkinsByFilter | ||
{ | ||
[Fact] | ||
public async Task Can_be_filtered_by_id() | ||
{ | ||
var sut = Composer.Resolve<Gw2Client>(); | ||
|
||
HashSet<int> ids = new() | ||
{ | ||
1, | ||
2, | ||
3 | ||
}; | ||
|
||
var actual = await sut.Wardrobe.GetSkinsByIds(ids); | ||
|
||
Assert.Collection( | ||
ids, | ||
first => Assert.Contains(actual.Value, found => found.Id == first), | ||
second => Assert.Contains(actual.Value, found => found.Id == second), | ||
third => Assert.Contains(actual.Value, found => found.Id == third) | ||
); | ||
} | ||
} |
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,19 @@ | ||
using System.Threading.Tasks; | ||
using GuildWars2.Tests.TestInfrastructure; | ||
using Xunit; | ||
|
||
namespace GuildWars2.Tests.Features.Skins; | ||
|
||
public class SkinsByPage | ||
{ | ||
[Fact] | ||
public async Task Can_be_filtered_by_page() | ||
{ | ||
var sut = Composer.Resolve<Gw2Client>(); | ||
|
||
var actual = await sut.Wardrobe.GetSkinsByPage(0, 3); | ||
|
||
Assert.Equal(3, actual.Value.Count); | ||
Assert.Equal(3, actual.PageContext.PageSize); | ||
} | ||
} |
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,18 @@ | ||
using System.Threading.Tasks; | ||
using GuildWars2.Tests.TestInfrastructure; | ||
using Xunit; | ||
|
||
namespace GuildWars2.Tests.Features.Skins; | ||
|
||
public class SkinsIndex | ||
{ | ||
[Fact] | ||
public async Task Is_not_empty() | ||
{ | ||
var sut = Composer.Resolve<Gw2Client>(); | ||
|
||
var actual = await sut.Wardrobe.GetSkinsIndex(); | ||
|
||
Assert.Equal(actual.ResultContext.ResultTotal, actual.Value.Count); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.