public async Task GetAllTransfersWillBeInReverseOrder()
        {
            mockBlockService.Setup(m => m.InvokeGet(It.IsAny <String>()))
            .ReturnsAsync("[{\"timestamp\":\"2018-04-21T19:47:54.368Z\"},{\"timestamp\":\"2018-04-21T19:46:54.368Z\"}]");

            List <NewTransfer> results = await clientWithMock.GetAllTransfers();

            for (int i = 0; i < results.Count() - 1; i++)
            {
                Assert.IsTrue(results[i].timestamp > results[i + 1].timestamp);
            }
        }
Exemplo n.º 2
0
 public async Task <IEnumerable <NewTransfer> > Get()
 {
     return(await client.GetAllTransfers());
 }