Beispiel #1
0
        public async Task Should_Delete_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() =>
            {
                await _dynamicParameterValueManager.DeleteAsync(dynamicParameterValue.Id);
            });

            await WithUnitOfWorkAsync(async() =>
            {
                try
                {
                    var entity = await _dynamicParameterValueManager.GetAsync(dynamicParameterValue.Id);
                    entity.ShouldBeNull();
                }
                catch (EntityNotFoundException)
                {
                }
            });
        }
Beispiel #2
0
 public async Task Delete(int id)
 {
     await _dynamicParameterValueManager.DeleteAsync(id);
 }