Esempio n. 1
0
        public async Task GetBeersAsyncReturnsNullOnError()
        {
            // Arrange
            var handler    = new Mock <HttpMessageHandler>();
            var httpClient = new HttpClient(handler.Object);

            // Act
            var sut =
                new BreweryClient(
                    httpClient,
                    Options.Create(new BrewerySettings()),
                    NullLogger <BreweryClient> .Instance);

            // Assert
            var results = await sut.GetBeersAsync();

            Assert.Null(results);
        }
Esempio n. 2
0
 public SalesController(GroceryContext context, BreweryClient client)
 {
     _context = context;
     _client  = client;
 }