diff --git a/Alpaca.Markets.Tests.All/Alpaca.Markets.Tests.All.csproj b/Alpaca.Markets.Tests.All/Alpaca.Markets.Tests.All.csproj index d2d73d1..e29d6f9 100644 --- a/Alpaca.Markets.Tests.All/Alpaca.Markets.Tests.All.csproj +++ b/Alpaca.Markets.Tests.All/Alpaca.Markets.Tests.All.csproj @@ -1,4 +1,4 @@ - + net6.0;net7.0 @@ -12,15 +12,15 @@ - - - - - - - - - + + + + + + + + + all runtime; build; native; contentfiles; analyzers diff --git a/Alpaca.Markets.Tests.Win/Alpaca.Markets.Tests.Win.csproj b/Alpaca.Markets.Tests.Win/Alpaca.Markets.Tests.Win.csproj index 3a6bfe5..d8cfa30 100644 --- a/Alpaca.Markets.Tests.Win/Alpaca.Markets.Tests.Win.csproj +++ b/Alpaca.Markets.Tests.Win/Alpaca.Markets.Tests.Win.csproj @@ -1,4 +1,4 @@ - + net472;net48;net481 @@ -12,17 +12,17 @@ - - + + - - - - - - - - + + + + + + + + all runtime; build; native; contentfiles; analyzers diff --git a/Alpaca.Markets.Tests/AlpacaCryptoDataClientTest.cs b/Alpaca.Markets.Tests/AlpacaCryptoDataClientTest.cs index cf1d760..475ca40 100644 --- a/Alpaca.Markets.Tests/AlpacaCryptoDataClientTest.cs +++ b/Alpaca.Markets.Tests/AlpacaCryptoDataClientTest.cs @@ -57,39 +57,13 @@ public async void GetDayHistoricalBarsWorks() AssertPageIsValid(bars, AssertBarIsValid); } - [Fact] - public async void ListHistoricalQuotesWorks() - { - var into = (await GetLastTradingDayCloseTimeUtc()).Date; - var from = into.AddDays(-3).Date; -#pragma warning disable CS0618 - var quotes = await Client.ListHistoricalQuotesAsync( - new HistoricalCryptoQuotesRequest(Symbol, from, into)); -#pragma warning restore CS0618 - - AssertPageIsValid(quotes, AssertQuoteIsValid, false); - } - - [Fact] - public async void GetHistoricalQuotesWorks() - { - var into = (await GetLastTradingDayCloseTimeUtc()).Date; - var from = into.AddDays(-3).Date; -#pragma warning disable CS0618 - var quotes = await Client.GetHistoricalQuotesAsync( - new HistoricalCryptoQuotesRequest(Symbols, from, into)); -#pragma warning restore CS0618 - - AssertPageIsValid(quotes, AssertQuoteIsValid, false); - } - [Fact] public async void ListHistoricalTradesWorks() { var into = (await GetLastTradingDayCloseTimeUtc()).Date; var from = into.AddDays(-1).Date; var trades = await Client.ListHistoricalTradesAsync( - new HistoricalCryptoTradesRequest(Symbol, from, into)); + new HistoricalCryptoTradesRequest(Symbol, from, into).WithPageSize(10)); AssertPageIsValid(trades, AssertTradeIsValid); } @@ -100,7 +74,7 @@ public async void GetHistoricalTradesWorks() var into = (await GetLastTradingDayCloseTimeUtc()).Date; var from = into.AddDays(-1).Date; var trades = await Client.GetHistoricalTradesAsync( - new HistoricalCryptoTradesRequest(Symbols, from, into)); + new HistoricalCryptoTradesRequest(Symbols, from, into).WithPageSize(10)); AssertPageIsValid(trades, AssertTradeIsValid); } diff --git a/Alpaca.Markets.Tests/AlpacaCryptoStreamingClientTest.Extensions.cs b/Alpaca.Markets.Tests/AlpacaCryptoStreamingClientTest.Extensions.cs index 7782971..710df5b 100644 --- a/Alpaca.Markets.Tests/AlpacaCryptoStreamingClientTest.Extensions.cs +++ b/Alpaca.Markets.Tests/AlpacaCryptoStreamingClientTest.Extensions.cs @@ -59,20 +59,20 @@ public async Task AsyncEnumerableWorks() var cancellationTokenSource = new CancellationTokenSource(); cancellationTokenSource.CancelAfter(TimeSpan.FromSeconds(15)); - var subscription = await client.SubscribeTradeAsync(Symbol); + var subscription = await client.SubscribeQuoteAsync(Symbol); await using (subscription.ConfigureAwait(false)) { - var atLeastOneTradeReceived = false; + var atLeastOneQuoteReceived = false; await foreach (var _ in subscription .AsAsyncEnumerable(cancellationTokenSource.Token) .ConfigureAwait(false)) { - atLeastOneTradeReceived = true; + atLeastOneQuoteReceived = true; break; } - Assert.True(atLeastOneTradeReceived); + Assert.True(atLeastOneQuoteReceived); } await client.DisconnectAsync(CancellationToken.None); diff --git a/Alpaca.Markets.Tests/AlpacaDataClientTest.Extensions.cs b/Alpaca.Markets.Tests/AlpacaDataClientTest.Extensions.cs index 20b3274..84b847c 100644 --- a/Alpaca.Markets.Tests/AlpacaDataClientTest.Extensions.cs +++ b/Alpaca.Markets.Tests/AlpacaDataClientTest.Extensions.cs @@ -13,7 +13,7 @@ public async void GetHistoricalBarsAsAsyncEnumerableWorks() var into = (await GetLastTradingDayCloseTimeUtc()).Date; var from = into.AddDays(-5).Date; await foreach (var bar in Client.GetHistoricalBarsAsAsyncEnumerable( - new HistoricalBarsRequest(Symbol, from, into, BarTimeFrame.Hour))) + new HistoricalBarsRequest(Symbol, from, into, BarTimeFrame.Hour))) { Assert.NotNull(bar); Assert.InRange(bar.TimeUtc, from, into); @@ -31,7 +31,7 @@ public async void GetHistoricalQuotesAsAsyncEnumerableWorks() try { await foreach (var quote in Client.GetHistoricalQuotesAsAsyncEnumerable( - new HistoricalQuotesRequest(Symbol, from, into), cancellationTokenSource.Token)) + new HistoricalQuotesRequest(Symbol, from, into), cancellationTokenSource.Token)) { Assert.NotNull(quote); Assert.InRange(quote.TimestampUtc, from, into);