Exemplo n.º 1
0
        public async Task Call_TotalPages_should_invoke_TotalNumberOfRecords()
        {
            paginationService = new PaginationService <WeatherHistory>(pagination.Object, pageLinkFactory.Object);
            await paginationService.TotalPages();

            pagination.Verify(x => x.TotalNumberOfRecords(), Times.Once);
        }
Exemplo n.º 2
0
        public async Task TotalPagesTest()
        {
            pagination.Setup(x => x.TotalNumberOfRecords()).ReturnsAsync(50);
            paginationService = new PaginationService <WeatherHistory>(pagination.Object, pageLinkFactory.Object);

            var expected = await pagination.Object.TotalNumberOfRecords();

            var result = await paginationService.TotalPages();

            Assert.AreEqual(expected, result);
        }