public async Task <IAssetConditionLayer> GetLayerAsync(string layerId) { var layer = await _assetConditionLayerRepository.GetAsync(layerId); if (layer == null) { return(null); } var conditions = await _cachedAssetConditionsService.GetConditionsAsync(layer.Id); var defaultCondition = await _assetDefaultConditionRepository.GetAsync(layer.Id); var model = Mapper.Map <AssetConditionLayer>(layer); model.AssetConditions = conditions.ToList(); model.AssetDefaultCondition = defaultCondition; return(model); }
public async Task GetConditions__InvalidInput_RaisesException(string layerId) { await _service.GetConditionsAsync(layerId); }