public void Redeem_points_exceeding_balance_throws_insufficient_funds() { var wallet = new Wallet(A.Dummy <string>()); wallet.Accrue(100); Assert.Throws <InsufficientFunds>(() => wallet.Redeem(101)); }
public void Accrue_points_increases_balance() { var expectedResult = 100; var wallet = new Wallet(A.Dummy <string>()); wallet.Accrue(100); Assert.AreEqual(expectedResult, wallet.Balance); }
public void Accrue_points_raises_new_event() { var expectedResult = 2; var wallet = new Wallet(A.Dummy <string>()); wallet.Accrue(A.Dummy <int>()); Assert.AreEqual(expectedResult, wallet.DomainEvents.Count); }