diff --git a/aspnet-core/tests/LINGYUN.Abp.Notifications.Tests/LINGYUN/Abp/Notifications/FakeNotificationSender.cs b/aspnet-core/tests/LINGYUN.Abp.Notifications.Tests/LINGYUN/Abp/Notifications/FakeNotificationSender.cs index ec5aee1b2..e5405b24b 100644 --- a/aspnet-core/tests/LINGYUN.Abp.Notifications.Tests/LINGYUN/Abp/Notifications/FakeNotificationSender.cs +++ b/aspnet-core/tests/LINGYUN.Abp.Notifications.Tests/LINGYUN/Abp/Notifications/FakeNotificationSender.cs @@ -63,7 +63,7 @@ public class FakeNotificationSender : INotificationSender, ITransientDependency NotificationSeverity severity = NotificationSeverity.Info, IEnumerable useProviders = null) { - var notification = NotificationDefinitionManager.GetOrNull(name); + var notification = await NotificationDefinitionManager.GetOrNullAsync(name); if (notification == null) { return ""; @@ -114,7 +114,7 @@ public class FakeNotificationSender : INotificationSender, ITransientDependency NotificationSeverity severity = NotificationSeverity.Info, IEnumerable useProviders = null) { - var notification = NotificationDefinitionManager.GetOrNull(name); + var notification = await NotificationDefinitionManager.GetOrNullAsync(name); if (notification == null) { return ""; diff --git a/aspnet-core/tests/LINGYUN.Abp.Notifications.Tests/LINGYUN/Abp/Notifications/NotificationsTestsDefinitionProvider_Tests.cs b/aspnet-core/tests/LINGYUN.Abp.Notifications.Tests/LINGYUN/Abp/Notifications/NotificationsTestsDefinitionProvider_Tests.cs index 01acb0ccc..3d453a266 100644 --- a/aspnet-core/tests/LINGYUN.Abp.Notifications.Tests/LINGYUN/Abp/Notifications/NotificationsTestsDefinitionProvider_Tests.cs +++ b/aspnet-core/tests/LINGYUN.Abp.Notifications.Tests/LINGYUN/Abp/Notifications/NotificationsTestsDefinitionProvider_Tests.cs @@ -1,4 +1,5 @@ using Shouldly; +using System.Threading.Tasks; using Volo.Abp.Localization; using Xunit; @@ -14,32 +15,32 @@ namespace LINGYUN.Abp.Notifications } [Fact] - public void GetGroups_Test() + public async Task GetGroups_Test() { - var groups = NotificationDefinitionManager.GetGroups(); + var groups = await NotificationDefinitionManager.GetGroupsAsync(); groups.Count.ShouldBe(2); } [Fact] - public void GetAll_Test() + public async Task GetNotifications_Test() { - var notifications = NotificationDefinitionManager.GetAll(); + var notifications = await NotificationDefinitionManager.GetNotificationsAsync(); notifications.Count.ShouldBe(6); } [Fact] - public void GetOrNull_Test() + public async Task GetOrNull_Test() { - NotificationDefinitionManager.GetOrNull(NotificationsTestsNames.Test2).ShouldNotBeNull(); - NotificationDefinitionManager.GetOrNull(NotificationsTestsNames.Test3).ShouldNotBeNull(); - NotificationDefinitionManager.GetOrNull("NullOfNotification").ShouldBeNull(); + (await NotificationDefinitionManager.GetOrNullAsync(NotificationsTestsNames.Test2)).ShouldNotBeNull(); + (await NotificationDefinitionManager.GetOrNullAsync(NotificationsTestsNames.Test3)).ShouldNotBeNull(); + (await NotificationDefinitionManager.GetOrNullAsync("NullOfNotification")).ShouldBeNull(); } [Theory] [InlineData(NotificationsTestsNames.Test1)] - public void Get_Test(string name) + public async Task Get_Test(string name) { - var notification = NotificationDefinitionManager.Get(name); + var notification = await NotificationDefinitionManager.GetAsync(name); notification.Name.ShouldBe(name); notification.DisplayName.ShouldBeOfType(); notification.Description.ShouldBeNull();