Fix permission and setting management modules for removed sync api

pull/2464/head
Halil İbrahim Kalkan 5 years ago
parent f6084749f9
commit 23a8a9f0fc

@ -65,7 +65,7 @@ namespace Volo.Abp.PermissionManagement.Application.Tests.Volo.Abp.PermissionMan
[Fact]
public async Task Update_Revoke_Test()
{
_permissionGrantRepository.Insert(
await _permissionGrantRepository.InsertAsync(
new PermissionGrant(
Guid.NewGuid(),
"MyPermission1",

@ -2,6 +2,7 @@
using Volo.Abp.Authorization.Permissions;
using Volo.Abp.Autofac;
using Volo.Abp.Modularity;
using Volo.Abp.Threading;
namespace Volo.Abp.PermissionManagement
{
@ -29,9 +30,9 @@ namespace Volo.Abp.PermissionManagement
{
using (var scope = context.ServiceProvider.CreateScope())
{
scope.ServiceProvider
AsyncHelper.RunSync(() => scope.ServiceProvider
.GetRequiredService<PermissionTestDataBuilder>()
.Build();
.BuildAsync());
}
}
}

@ -1,4 +1,5 @@
using System;
using System.Threading.Tasks;
using Volo.Abp.Authorization.Permissions;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Guids;
@ -19,9 +20,9 @@ namespace Volo.Abp.PermissionManagement
_permissionGrantRepository = permissionGrantRepository;
}
public void Build()
public async Task BuildAsync()
{
_permissionGrantRepository.Insert(
await _permissionGrantRepository.InsertAsync(
new PermissionGrant(
_guidGenerator.Create(),
"MyPermission1",
@ -30,7 +31,7 @@ namespace Volo.Abp.PermissionManagement
)
);
_permissionGrantRepository.Insert(
await _permissionGrantRepository.InsertAsync(
new PermissionGrant(
_guidGenerator.Create(),
"MyPermission3",

@ -22,7 +22,7 @@ namespace Volo.Abp.PermissionManagement
[Fact]
public async Task CheckAsync()
{
_permissionGrantRepository.Insert(
await _permissionGrantRepository.InsertAsync(
new PermissionGrant(
Guid.NewGuid(),
"MyPermission1",
@ -54,7 +54,7 @@ namespace Volo.Abp.PermissionManagement
[Fact]
public async Task SetAsync()
{
_permissionGrantRepository.Insert(
await _permissionGrantRepository.InsertAsync(
new PermissionGrant(
Guid.NewGuid(),
"MyPermission1",

@ -2,6 +2,7 @@
using Volo.Abp.Autofac;
using Volo.Abp.Modularity;
using Volo.Abp.Settings;
using Volo.Abp.Threading;
namespace Volo.Abp.SettingManagement
{
@ -20,9 +21,9 @@ namespace Volo.Abp.SettingManagement
{
using (var scope = context.ServiceProvider.CreateScope())
{
scope.ServiceProvider
AsyncHelper.RunSync(()=> scope.ServiceProvider
.GetRequiredService<SettingTestDataBuilder>()
.Build();
.BuildAsync());
}
}
}

@ -1,4 +1,5 @@
using Volo.Abp.DependencyInjection;
using System.Threading.Tasks;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Guids;
using Volo.Abp.Settings;
@ -20,9 +21,9 @@ namespace Volo.Abp.SettingManagement
_testData = testData;
}
public void Build()
public async Task BuildAsync()
{
_settingRepository.Insert(
await _settingRepository.InsertAsync(
new Setting(
_testData.SettingId,
"MySetting1",
@ -31,7 +32,7 @@ namespace Volo.Abp.SettingManagement
)
);
_settingRepository.Insert(
await _settingRepository.InsertAsync(
new Setting(
_guidGenerator.Create(),
"MySetting2",
@ -40,7 +41,7 @@ namespace Volo.Abp.SettingManagement
)
);
_settingRepository.Insert(
await _settingRepository.InsertAsync(
new Setting(
_guidGenerator.Create(),
"MySetting2",
@ -50,7 +51,7 @@ namespace Volo.Abp.SettingManagement
)
);
_settingRepository.Insert(
await _settingRepository.InsertAsync(
new Setting(
_guidGenerator.Create(),
"MySetting2",
@ -60,7 +61,7 @@ namespace Volo.Abp.SettingManagement
)
);
_settingRepository.Insert(
await _settingRepository.InsertAsync(
new Setting(
_guidGenerator.Create(),
"MySettingWithoutInherit",
@ -69,7 +70,7 @@ namespace Volo.Abp.SettingManagement
)
);
_settingRepository.Insert(
await _settingRepository.InsertAsync(
new Setting(
_guidGenerator.Create(),
"MySettingWithoutInherit",

Loading…
Cancel
Save