Exemple #1
0
        public void When_I_save_a_bank_account_Then_I_can_retrieve_it()
        {
            var id       = AccountId.NewId();
            var original = GetBankAccount(id);

            _bankAccountRepository.Save(original);
            var retrieved = _bankAccountRepository.Retrieve(id);

            AssertSame(original, retrieved);
        }
        private static BankAccount NewAccount(Money monies)
        {
            var bankAccount = BankAccount.Factory.OpenNewAccount(AccountId.NewId(), GetNow());

            return(bankAccount.Deposit(monies, GetNow()));
        }