Exemplo n.º 1
0
        private async Task <decimal> GetTickerPrice(string market)
        {
            // Arrange
            var client     = new BitvavoClient <List <TickerPrice> >();
            var mapper     = new TickerPriceMapper();
            var repository = new TickerPriceRepository(client, mapper);

            // Act
            List <Domain.Models.TickerPrice> result = await repository.Get();

            Domain.Models.TickerPrice tickerPrice = result.SingleOrDefault(x => x.Market == market);

            // Assert
            tickerPrice.Should().NotBeNull();
            return(tickerPrice.Price);
        }
Exemplo n.º 2
0
 private static void WriteTickerPrice(Domain.Models.TickerPrice tickerPrice)
 {
     System.Console.WriteLine($"{tickerPrice.Market} {tickerPrice.Price}");
 }