コード例 #1
0
        private AccountType CreateAccountType(string accountName, int accountId)
        {
            var result = AccountTypeBuilder.Create(accountName).WithId(accountId).Build();

            Workspace.Add(result);
            return(result);
        }
コード例 #2
0
        public void CanCreateCashAccount()
        {
            var accountType = AccountTypeBuilder.Create("Payment Accounts").Build();

            Workspace.Add(accountType);
            var account = AccountBuilder.Create("Cash").WithAccountType(accountType).Build();

            Workspace.Add(account);
            Workspace.CommitChanges();
            var balance = AccountService.GetAccountBalance(account.Id);

            Assert.AreEqual(0, balance);
        }