예제 #1
0
 public void Handle(AuthenticationCreated message)
 {
     Bus.Send(new Messages.Commands.CreateUser
     {
         UserId = Data.UserID,
         Name   = Data.Name,
         Email  = Data.Email
     });
 }
예제 #2
0
        public void ShouldCreateAuthentication()
        {
            var          id             = Guid.NewGuid();
            const string email          = "something";
            const string hashedPassword = "******";
            var          @event         = new AuthenticationCreated
            {
                AuthenticationID = id,
                Email            = email,
                HashedPassword   = hashedPassword
            };
            var handler = new Subscribers.AuthenticationCreated(Repository);

            handler.Handle(@event);
            Repository.AssertWasCalled(x => x.Save(Arg <Authentication> .Is.Anything));
        }
 private void Apply(AuthenticationCreated authenticationCreated)
 {
     this.ID              = authenticationCreated.ID;
     this._email          = authenticationCreated.Email;
     this._hashedPassword = authenticationCreated.HashedPassword;
 }