public void Deactivate_deactivates_account() { var account = new AccountBuilder().Build(); account.Deactivate(); Assert.IsFalse(account.IsActive); }
public virtual void Populate(ISession session) { JohnDoe = new AccountBuilder() .Named("JohnDoe") .WithPassword("superDuper12") .WithRole(Role.Administrator) .Build(); LaraCroft = new AccountBuilder() .Named("LaraCroft") .WithPassword("superDuper12") .Build(); session.Save(JohnDoe); session.Save(LaraCroft); }
public void Deactivate_throws_businessexception_if_account_is_admin() { var account = new AccountBuilder().Named("admin").Build(); Assert.Throws<BusinessException>(account.Deactivate); }