Skip to content

Commit

Permalink
Added withdrawal to integration specs
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Janssens authored and Tom Janssens committed Mar 19, 2012
1 parent 2ded4d5 commit 50f8651
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion YakShayQRS.Specs/IntegrationSpecs.cs
Expand Up @@ -128,12 +128,13 @@ public void Deposits_and_withdraws_should_not_interfere_with_each_other()
SUT.HandleUntilAllConsumed(Message.FromAction(x => x.DepositAmount(AccountId: "account/1", Amount: 126m)), mq.Add, mq.Filter);
SUT.HandleUntilAllConsumed(Message.FromAction(x => x.DepositAmount(AccountId: "account/2", Amount: 10m)), mq.Add, mq.Filter);
SUT.HandleUntilAllConsumed(Message.FromAction(x => x.Transfer(AccountId: "account/1", TargetAccountId: "account/2", Amount: 26m)), mq.Add, mq.Filter);
SUT.HandleUntilAllConsumed(Message.FromAction(x => x.WithdrawAmount(AccountId: "account/2", Amount: 10m)), mq.Add, mq.Filter);

var bal = new AccountBalances();
SUT.ApplyHistory(bal, mq.Filter);
bal.Balances.Count.ShouldBe(2);
bal.Balances["account/1"].ShouldBe(100m);
bal.Balances["account/2"].ShouldBe(36m);
bal.Balances["account/2"].ShouldBe(26m);
}
}
}

0 comments on commit 50f8651

Please sign in to comment.