public async void ListColors( EStatusCode expectedStatus, ListColors query ) { var (status, result) = await Request.Get<QueryResultListTest<ColorList>>(Uri, query); Assert.Equal(expectedStatus, status); if (expectedStatus == EStatusCode.Success) { Assert.NotEmpty(result.Data); var expectedTotal = Enum.GetValues(typeof(EColor)).Length; Assert.Equal(expectedTotal, result.TotalRows); } }
public async Task <ActionResult <QueryResultList <ColorList> > > ListColorsAsync([FromQuery] ListColors query) { return(GetResult(await _queriesHanlder.Handle(query))); }