-
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.
Make FragmentClient the main entry point.
- Loading branch information
Showing
9 changed files
with
63 additions
and
44 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
27 changes: 14 additions & 13 deletions
27
src/TonRadar.Fragment.Test/FragmentNumbersClientAuctionTests.cs
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 |
---|---|---|
@@ -1,56 +1,57 @@ | ||
using TonRadar.Fragment.Client; | ||
using TonRadar.Fragment.Enum; | ||
|
||
namespace TonRadar.Fragment.Test | ||
{ | ||
[Trait("GitHubActions", "Skip")] | ||
public class FragmentNumbersClientAuctionTests | ||
public class FragmentClientAuctionTests | ||
{ | ||
[Fact] | ||
public async Task GetAuctionItems_MustWork() | ||
{ | ||
var client = new FragmentNumbersClient(); | ||
var client = new FragmentClient(); | ||
|
||
Assert.True((await client.GetAuctionItemsAsync()).Any()); | ||
Assert.True((await client.Numbers.GetAuctionItemsAsync()).Any()); | ||
} | ||
|
||
[Fact] | ||
public async Task GetAuctionItems_OnAuction_MustWork() | ||
{ | ||
var client = new FragmentNumbersClient(); | ||
var client = new FragmentClient(); | ||
|
||
Assert.True((await client.GetAuctionItemsAsync(FragmentFilterType.OnAuction)).Any()); | ||
Assert.True((await client.Numbers.GetAuctionItemsAsync(FragmentFilterType.OnAuction)).Any()); | ||
} | ||
|
||
[Fact] | ||
public async Task GetAuctionItems_OnAuction_EndingSoon_MustWork() | ||
{ | ||
var client = new FragmentNumbersClient(); | ||
var client = new FragmentClient(); | ||
|
||
Assert.True((await client.GetAuctionItemsAsync(FragmentFilterType.OnAuction, FragmentSortType.EndingSoon)).Any()); | ||
Assert.True((await client.Numbers.GetAuctionItemsAsync(FragmentFilterType.OnAuction, FragmentSortType.EndingSoon)).Any()); | ||
} | ||
|
||
[Fact] | ||
public async Task GetAuctionItems_OnAuction_PriceHighToLow_MustWork() | ||
{ | ||
var client = new FragmentNumbersClient(); | ||
var client = new FragmentClient(); | ||
|
||
Assert.True((await client.GetAuctionItemsAsync(FragmentFilterType.OnAuction, FragmentSortType.PriceHighToLow)).Any()); | ||
Assert.True((await client.Numbers.GetAuctionItemsAsync(FragmentFilterType.OnAuction, FragmentSortType.PriceHighToLow)).Any()); | ||
} | ||
|
||
[Fact] | ||
public async Task GetAuctionItems_OnAuction_PriceLowToHigh_MustWork() | ||
{ | ||
var client = new FragmentNumbersClient(); | ||
var client = new FragmentClient(); | ||
|
||
Assert.True((await client.GetAuctionItemsAsync(FragmentFilterType.OnAuction, FragmentSortType.PriceLowToHigh)).Any()); | ||
Assert.True((await client.Numbers.GetAuctionItemsAsync(FragmentFilterType.OnAuction, FragmentSortType.PriceLowToHigh)).Any()); | ||
} | ||
|
||
[Fact] | ||
public async Task GetAuctionItems_OnAuction_RecentlyListed_MustWork() | ||
{ | ||
var client = new FragmentNumbersClient(); | ||
var client = new FragmentClient(); | ||
|
||
Assert.True((await client.GetAuctionItemsAsync(FragmentFilterType.OnAuction, FragmentSortType.RecentlyListed)).Any()); | ||
Assert.True((await client.Numbers.GetAuctionItemsAsync(FragmentFilterType.OnAuction, FragmentSortType.RecentlyListed)).Any()); | ||
} | ||
} | ||
} |
23 changes: 12 additions & 11 deletions
23
src/TonRadar.Fragment.Test/FragmentNumbersClientSaleTests.cs
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 |
---|---|---|
@@ -1,48 +1,49 @@ | ||
using TonRadar.Fragment.Client; | ||
using TonRadar.Fragment.Enum; | ||
|
||
namespace TonRadar.Fragment.Test | ||
{ | ||
[Trait("GitHubActions", "Skip")] | ||
public class FragmentNumbersClientSaleTests | ||
public class FragmentClientSaleTests | ||
{ | ||
[Fact] | ||
public async Task GetAuctionItems_ForSale_MustWork() | ||
{ | ||
var client = new FragmentNumbersClient(); | ||
var client = new FragmentClient(); | ||
|
||
Assert.True((await client.GetAuctionItemsAsync(FragmentFilterType.ForSale)).Any()); | ||
Assert.True((await client.Numbers.GetAuctionItemsAsync(FragmentFilterType.ForSale)).Any()); | ||
} | ||
|
||
[Fact] | ||
public async Task GetAuctionItems_ForSale_EndingSoon_MustWork() | ||
{ | ||
var client = new FragmentNumbersClient(); | ||
var client = new FragmentClient(); | ||
|
||
Assert.True((await client.GetAuctionItemsAsync(FragmentFilterType.ForSale, FragmentSortType.EndingSoon)).Any()); | ||
Assert.True((await client.Numbers.GetAuctionItemsAsync(FragmentFilterType.ForSale, FragmentSortType.EndingSoon)).Any()); | ||
} | ||
|
||
[Fact] | ||
public async Task GetAuctionItems_ForSale_PriceHighToLow_MustWork() | ||
{ | ||
var client = new FragmentNumbersClient(); | ||
var client = new FragmentClient(); | ||
|
||
Assert.True((await client.GetAuctionItemsAsync(FragmentFilterType.ForSale, FragmentSortType.PriceHighToLow)).Any()); | ||
Assert.True((await client.Numbers.GetAuctionItemsAsync(FragmentFilterType.ForSale, FragmentSortType.PriceHighToLow)).Any()); | ||
} | ||
|
||
[Fact] | ||
public async Task GetAuctionItems_ForSale_PriceLowToHigh_MustWork() | ||
{ | ||
var client = new FragmentNumbersClient(); | ||
var client = new FragmentClient(); | ||
|
||
Assert.True((await client.GetAuctionItemsAsync(FragmentFilterType.ForSale, FragmentSortType.PriceLowToHigh)).Any()); | ||
Assert.True((await client.Numbers.GetAuctionItemsAsync(FragmentFilterType.ForSale, FragmentSortType.PriceLowToHigh)).Any()); | ||
} | ||
|
||
[Fact] | ||
public async Task GetAuctionItems_ForSale_RecentlyListed_MustWork() | ||
{ | ||
var client = new FragmentNumbersClient(); | ||
var client = new FragmentClient(); | ||
|
||
Assert.True((await client.GetAuctionItemsAsync(FragmentFilterType.ForSale, FragmentSortType.RecentlyListed)).Any()); | ||
Assert.True((await client.Numbers.GetAuctionItemsAsync(FragmentFilterType.ForSale, FragmentSortType.RecentlyListed)).Any()); | ||
} | ||
} | ||
} |
23 changes: 12 additions & 11 deletions
23
src/TonRadar.Fragment.Test/FragmentNumbersClientSoldTests.cs
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 |
---|---|---|
@@ -1,48 +1,49 @@ | ||
using TonRadar.Fragment.Client; | ||
using TonRadar.Fragment.Enum; | ||
|
||
namespace TonRadar.Fragment.Test | ||
{ | ||
[Trait("GitHubActions", "Skip")] | ||
public class FragmentNumbersClientSoldTests | ||
public class FragmentClientSoldTests | ||
{ | ||
[Fact] | ||
public async Task GetAuctionItems_Sold_MustWork() | ||
{ | ||
var client = new FragmentNumbersClient(); | ||
var client = new FragmentClient(); | ||
|
||
Assert.True((await client.GetAuctionItemsAsync(FragmentFilterType.Sold)).Any()); | ||
Assert.True((await client.Numbers.GetAuctionItemsAsync(FragmentFilterType.Sold)).Any()); | ||
} | ||
|
||
[Fact] | ||
public async Task GetAuctionItems_Sold_EndingSoon_MustWork() | ||
{ | ||
var client = new FragmentNumbersClient(); | ||
var client = new FragmentClient(); | ||
|
||
Assert.True((await client.GetAuctionItemsAsync(FragmentFilterType.Sold, FragmentSortType.EndingSoon)).Any()); | ||
Assert.True((await client.Numbers.GetAuctionItemsAsync(FragmentFilterType.Sold, FragmentSortType.EndingSoon)).Any()); | ||
} | ||
|
||
[Fact] | ||
public async Task GetAuctionItems_Sold_PriceHighToLow_MustWork() | ||
{ | ||
var client = new FragmentNumbersClient(); | ||
var client = new FragmentClient(); | ||
|
||
Assert.True((await client.GetAuctionItemsAsync(FragmentFilterType.Sold, FragmentSortType.PriceHighToLow)).Any()); | ||
Assert.True((await client.Numbers.GetAuctionItemsAsync(FragmentFilterType.Sold, FragmentSortType.PriceHighToLow)).Any()); | ||
} | ||
|
||
[Fact] | ||
public async Task GetAuctionItems_Sold_PriceLowToHigh_MustWork() | ||
{ | ||
var client = new FragmentNumbersClient(); | ||
var client = new FragmentClient(); | ||
|
||
Assert.True((await client.GetAuctionItemsAsync(FragmentFilterType.Sold, FragmentSortType.PriceLowToHigh)).Any()); | ||
Assert.True((await client.Numbers.GetAuctionItemsAsync(FragmentFilterType.Sold, FragmentSortType.PriceLowToHigh)).Any()); | ||
} | ||
|
||
[Fact] | ||
public async Task GetAuctionItems_Sold_RecentlyListed_MustWork() | ||
{ | ||
var client = new FragmentNumbersClient(); | ||
var client = new FragmentClient(); | ||
|
||
Assert.True((await client.GetAuctionItemsAsync(FragmentFilterType.Sold, FragmentSortType.RecentlyListed)).Any()); | ||
Assert.True((await client.Numbers.GetAuctionItemsAsync(FragmentFilterType.Sold, FragmentSortType.RecentlyListed)).Any()); | ||
} | ||
} | ||
} |
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
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