Пример #1
0
 public void CanRedeemGiftCard()
 {
     var x = new GiftCard(100, Currency.EUR);
     Assert.IsTrue(x.IsRedeemed == false);
     x.Redeem();
     Assert.IsTrue(x.IsRedeemed == true);
 }
Пример #2
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
            {
            }
        }
Пример #3
0
 public void CanCreateGiftCard()
 {
     var x = new GiftCard(100, Currency.EUR);
     Assert.IsTrue(x.IsRedeemed == false);
 }