Example #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);
        }
Example #2
0
        public static async Task Main(string[] args)
        {
            List <Domain.Models.TickerPrice> prices = await repository.Get();

            prices.ForEach(WriteTickerPrice);
        }