You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
abp/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/DistributedUserUpdateHandle...

29 lines
848 B

using System.Threading.Tasks;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Domain.Entities.Events.Distributed;
using Volo.Abp.EventBus.Distributed;
using Volo.Abp.Testing.Utils;
using Volo.Abp.Users;
namespace Volo.Abp.Identity
{
public class DistributedUserUpdateHandler : IDistributedEventHandler<EntityUpdatedEto<UserEto>>, ITransientDependency
{
private readonly ITestCounter _testCounter;
public DistributedUserUpdateHandler(ITestCounter testCounter)
{
_testCounter = testCounter;
}
public Task HandleEventAsync(EntityUpdatedEto<UserEto> eventData)
{
if (eventData.Entity.UserName == "john.nash")
{
_testCounter.Increment("EntityUpdatedEto<UserEto>");
}
return Task.CompletedTask;
}
}
}