예제 #1
0
        public void describe_register_user()
        {
            //before = () => DomainEvents.Register<UserRegistered>(u => expected = u.UserCreated);

            context["when create a user"] = () =>
            {
                user = new User(new TenantId(), "teste", "master", "*****@*****.**");

                it["prepares to notify"] = () => Assert.AreEqual(expected, user);
            };
        }
예제 #2
0
 public void throw_exception_when_user_password_is_null()
 {
     user = new User(new TenantId(), "user", null, "*****@*****.**");
 }
예제 #3
0
 public void throw_exception_when_user_name_is_empty()
 {
     user = new User(new TenantId(), "", "user", "*****@*****.**");
 }
예제 #4
0
 public void throw_exception_when_user_email_is_null()
 {
     user = new User(new TenantId(), "user", "password", null);
 }
예제 #5
0
 public void throw_exception_when_user_email_is_invalid()
 {
     user = new User(new TenantId(), "user", "password", "teste");
 }
예제 #6
0
 public void Register(Tenant tenant, User user)
 {
     _dataContext.Tenants.Add(tenant);
     _dataContext.Users.Add(user);
     _dataContext.SaveChanges();
 }