public void ShouldBeAbleToAcceptPendingOutTransfer()
        {
            var id     = Guid.NewGuid();
            var result = Account.Create(VALIDNAME, 50);

            result = Account.StartTransferTo(id, "AC002", 10, result.SucceededWith());
            result = Account.AcceptTransferTo(id, result.SucceededWith());

            var account = result.SucceededWith();

            Assert.AreEqual(0, account.PendingOut.Count);
        }
示例#2
0
        private void Handle(TransferConfirmation command)
        {
            var result = Account.AcceptTransferTo(command.Id, Data);

            if (result.IsOk)
            {
                Data = result.SucceededWith();
            }
            else
            {
                //TODO Samething as error 400
                //Sender.Tell()
            }

            Context.Log(x => x.Info("{Actor} - Transfer Accepted.", Self.Path));
        }