japanese-pokemon-cards-sdk-.../JpnCardsPokemon.Tests/CardTests.cs

28 lines
977 B
C#
Raw Normal View History

2023-03-01 22:06:38 +01:00
using JpnCardsPokemon.Sdk.Utils.QueryFilter;
using JpnCardsPokemon.Tests.Classes;
2023-03-01 22:06:38 +01:00
namespace JpnCardsPokemon.Tests;
public class CardTests : ApiTestClass
{
[Test]
public async Task TestFetchCards()
{
2023-03-01 21:48:01 +01:00
var cards = await Client.FetchCardsAsync(new CardQueryFilterBuilder { Name = "morpeko" });
Assert.IsNotEmpty(cards);
}
2023-03-03 15:24:06 +01:00
[Test]
public async Task TestGetPrices()
{
// Radiant charizard from Go may have prices in different conditions
var card = (await Client.FetchCardsAsync(new CardQueryFilterBuilder { Uuid = 48495360 })).FirstOrDefault();
Assert.IsNotNull(card);
Assert.IsNotEmpty(card.Prices);
// Zubat, common from Dark Phantasma may have prices for different versions (regular + reverse holo)
card = (await Client.FetchCardsAsync(new CardQueryFilterBuilder { Uuid = 95800678 })).FirstOrDefault();
Assert.IsNotNull(card);
Assert.IsNotEmpty(card.Prices);
}
}