コード例 #1
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));
 }
コード例 #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));
        }