예제 #1
0
        public void CannotRedeemGiftCardTwice()
        {
            var x = new GiftCard(100, Currency.EUR);

            Assert.IsTrue(x.IsRedeemed == false);
            x.Redeem();
            Assert.IsTrue(x.IsRedeemed == true);

            try
            {
                x.Redeem();
                Assert.Fail();
            }
            catch
            {
            }
        }
예제 #2
0
        public void CanRedeemGiftCard()
        {
            var x = new GiftCard(100, Currency.EUR);

            Assert.IsTrue(x.IsRedeemed == false);
            x.Redeem();
            Assert.IsTrue(x.IsRedeemed == true);
        }