public async void ListModelsSelect(
            EStatusCode expectedStatus,
            ListModelsSelect query
            )
        {
            var model = EntitiesFactory.NewModel(brandId: query.BrandId).Save();

            var(status, result) = await Request.Get <QueryResultListTest <ModelSelectList> >(Uri, query);

            Assert.Equal(expectedStatus, status);
            if (expectedStatus == EStatusCode.Success)
            {
                var modelResult = result.Data.FirstOrDefault(m => m.Id == model.Id);
                Assert.NotNull(modelResult);
                Assert.Equal(model.Name, modelResult.Name);
            }
        }
Exemplo n.º 2
0
 public async Task <ActionResult <QueryResultList <ModelSelectList> > > GetSelectListAsync([FromQuery] ListModelsSelect query)
 {
     return(GetResult(await _queriesHanlder.Handle(query)));
 }