Esempio n. 1
0
        public void Can_calculate_giftCard_remainingAmount()
        {
            var gc = new GiftCard()
            {
                Amount = 100
            };
            gc.GiftCardUsageHistory.Add
                (
                    new GiftCardUsageHistory()
                    {
                        UsedValue = 30
                    }

                );
            gc.GiftCardUsageHistory.Add
                (
                    new GiftCardUsageHistory()
                    {
                        UsedValue = 20
                    }

                );
            gc.GiftCardUsageHistory.Add
                (
                    new GiftCardUsageHistory()
                    {
                        UsedValue = 5
                    }

                );

            gc.GetGiftCardRemainingAmount().ShouldEqual(45);
        }