public ChangePasswordScenario(IWindsorContainer container) { _container = container; NewPassword = new Password(NewPasswordAsString); var registerAccountScenario = new RegisterAccountScenario(container); Account = registerAccountScenario.Execute(); OldPassword = registerAccountScenario.PasswordAsString; }
public ChangePasswordScenario(IWindsorContainer container) { _container = container; NewPassword = new Password(NewPasswordAsString); var registerAccountScenario = new RegisterAccountScenario(container); Account = registerAccountScenario.Execute(); OldPassword = registerAccountScenario.PasswordAsString; }
public void ResettingTestDatabasesRemovesAccounts() { Account account; using(Container.BeginScope()) { account = new RegisterAccountScenario(Container).Execute(); Container.Resolve<IAccountRepository>().Get(account.Id); } Container.ResetTestDataBases(); using(Container.BeginScope()) { Assert.Throws<AggregateRootNotFoundException>(() => Container.Resolve<IAccountRepository>().Get(account.Id)); } }
public void SetupWiringAndCreateRepositoryAndScope() { _repository = Container.Resolve<IAccountRepository>(); _duplicateAccountChecker = Container.Resolve<IDuplicateAccountChecker>(); _registerAccountScenario = new RegisterAccountScenario(Container); }
public void RegisterAccount() { _registerAccountScenario = new RegisterAccountScenario(Container); _account = _registerAccountScenario.Execute(); _changePasswordScenario = new ChangePasswordScenario(Container); }
public void RegisterAccount() { RegisterAccountScenario = new RegisterAccountScenario(Container); RegisteredAccount = RegisterAccountScenario.Execute(); }