Exemplo n.º 1
0
        public async Task Should_Get_Value_Async()
        {
            var dynamicParameter = CreateAndGetDynamicParameterWithTestPermission();

            var dynamicParameterValue = new DynamicParameterValue()
            {
                DynamicParameterId = dynamicParameter.Id,
                Value    = "Test",
                TenantId = AbpSession.TenantId
            };

            await WithUnitOfWorkAsync(async() =>
            {
                await _dynamicParameterValueManager.AddAsync(dynamicParameterValue);
            });

            await RunAndCheckIfPermissionControlledAsync(async() =>
            {
                var entity = await _dynamicParameterValueManager.GetAsync(dynamicParameterValue.Id);
                CheckEquality(entity, dynamicParameterValue);
            });
        }
Exemplo n.º 2
0
        public async Task <DynamicParameterValueDto> Get(int id)
        {
            var entity = await _dynamicParameterValueManager.GetAsync(id);

            return(ObjectMapper.Map <DynamicParameterValueDto>(entity));
        }