示例#1
0
        public void ReconstitutedNewAccountHasCorrectName()
        {
            var offBudgetId             = BudgetId.OffBudgetId;
            var accountId               = new AccountId(new Guid("A34C7724-F9FE-4A14-89A2-C8F1D662EE2A"));
            var prevouslyCreatedAccount = AccountFactory.Create(accountId, "Test2", offBudgetId, this.unitOfWork);

            var account = AccountFactory.Load(accountId, this.unitOfWork);

            Assert.AreEqual("Test2", account.Name);
        }
示例#2
0
 /// <summary>
 /// Find (rehydrate) an account aggregate.
 /// <para>Note: all changes to the account are directly written to the unit of work.</para>
 /// </summary>
 /// <param name="id">Account Id</param>
 /// <param name="unitOfWork">Unit of work</param>
 /// <returns><para>Rehydrated aggregate. </para>
 /// <para>Note: all changes to the account are directly written to the unit of work.</para></returns>
 public Account Find(AccountId id, IUnitOfWork unitOfWork)
 {
     return(AccountFactory.Load(id, unitOfWork));
 }