-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add currency parameter to store app details method (#117)
- Loading branch information
1 parent
9a71baf
commit 9d725ab
Showing
5 changed files
with
47 additions
and
9 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
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,42 @@ | ||
using AutoMapper; | ||
using SteamWebAPI2.Interfaces; | ||
using SteamWebAPI2.Mappings; | ||
using System.Threading.Tasks; | ||
using Xunit; | ||
|
||
namespace Steam.UnitTests | ||
{ | ||
public class SteamStoreTests | ||
{ | ||
private readonly SteamStore steamStore; | ||
|
||
public SteamStoreTests() | ||
{ | ||
var mapperConfig = new MapperConfiguration(config => | ||
{ | ||
config.AddProfile<SteamStoreProfile>(); | ||
}); | ||
|
||
var mapper = mapperConfig.CreateMapper(); | ||
|
||
steamStore = new SteamStore(mapper); | ||
} | ||
|
||
[Fact] | ||
public async Task GetStoreAppDetailsAsync_Should_Succeed() | ||
{ | ||
var response = await steamStore.GetStoreAppDetailsAsync(1086940); | ||
Assert.NotNull(response); | ||
Assert.NotNull(response.Name); | ||
} | ||
|
||
[Fact] | ||
public async Task GetStoreAppDetailsAsync_WithCurrency_Should_Succeed() | ||
{ | ||
var response = await steamStore.GetStoreAppDetailsAsync(1086940, "mx"); | ||
Assert.NotNull(response); | ||
Assert.NotNull(response.PriceOverview?.Currency); | ||
Assert.Equal("MXN", response.PriceOverview.Currency); | ||
} | ||
} | ||
} |
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