コード例 #1
0
        public async Task GetRowsAsync_NoFilter()
        {
            var airTableClient = new Mock <AirTableClientProvider>("");

            airTableClient.Setup(a => a.GetStringAsync(It.IsAny <string>())).ReturnsAsync(JsonConvert.SerializeObject(new AirTableResponse {
                Records = new List <AirTableResponseItem> {
                    _activeItem, _deletedItem
                }
            }));

            var itemRepo = new ItemRepo(airTableClient.Object);
            var response = await itemRepo.GetRowsAsync(true);

            Assert.NotNull(response);
            Assert.Equal(2, response.Count());
        }