public void DestinationUpdatedIfItemMovedLazily() { Account account1; Account account3; account1 = new Account { Name = "Bank Account", IsValid = true, }; account1.setType(_accountType1); account1.setCategory(_accountCategory); account3 = new Account { Name = "Not Source", IsValid = true, }; account3.setType(_accountType3); account3.setCategory(_accountCategory); var item = new Item { Value = 99.99M, Description = "Move Test", IsVerified = true, }; item.SetDestinationLazy(account3); Assert.AreEqual(item.Destination, account3); Assert.AreNotEqual(item.Destination, account1); item.SetDestinationLazy(account1); Assert.AreEqual(item.Destination, account1); Assert.AreNotEqual(item.Destination, account3); }
public void Cannot_move_money_from_destination_only_account_lazily() { var item = new Item { Value = 99.01M, Description = "Add Test", IsVerified = true, }; item.SetTransaction(_transaction1); item.SetSourceLazy(_account3); item.SetDestinationLazy(_account1); }
public void Cannot_move_money_within_the_same_account_lazily() { var item = new Item { Value = 567.78M, Description = "Add Test", IsVerified = true, }; item.SetTransaction(_transaction1); item.SetSourceLazy(_account1); item.SetDestinationLazy(_account1); }