public async Task ReturnListOfAccountsIndexSuccessfuly() { // Arrange GetAccountIndexListQuery query = new GetAccountIndexListQuery(); // Act var result = await handler.Handle(query, CancellationToken.None); // Assert Assert.IsType <List <AccountIndexView> > (result); Assert.True((result as List <AccountIndexView>).Count() > 0); }
public async Task <ActionResult <IEnumerable <AccountIndexView> > > GetAccountIndex([FromQuery] GetAccountIndexListQuery query) { var index = await _Mediator.Send(query); return(Ok(index)); }