public async Task <IActionResult> GetAsync() { var typeModels = await _fieldTypesService.GetAllAsync(); var typeViewModels = _mapper.Map <IEnumerable <FieldTypeViewModel> >(typeModels); return(Ok(typeViewModels)); }
public async void GetAll_FieldTypesCount() { var result = await _fieldTypeService.GetAllAsync(); Assert.Equal(2, result.Count()); }