public void RemoveAppendedPromotion_PromotionsChangedEvenFired()
        {
            var promotionOne = BuildPromotion("Promotion One");

            var treeData = BuildPromotionTreeData(new List <IPromotionPrerequisiteData>());

            var promotionTree = new PromotionTree(treeData);

            promotionTree.AppendPromotion(promotionOne);

            promotionTree.PromotionsChanged += (sender, e) => Assert.Pass();

            promotionTree.RemoveAppendedPromotion(promotionOne);

            Assert.Fail("PromotionsChanged not fired");
        }
        public void RemoveAppendedPromotion_ReflectedInAppendedPromotions()
        {
            var promotionOne = BuildPromotion("Promotion One");
            var promotionTwo = BuildPromotion("Promotion Two");

            var treeData = BuildPromotionTreeData(new List <IPromotionPrerequisiteData>());

            var promotionTree = new PromotionTree(treeData);

            promotionTree.AppendPromotion(promotionOne);
            promotionTree.AppendPromotion(promotionTwo);

            promotionTree.RemoveAppendedPromotion(promotionOne);

            CollectionAssert.AreEquivalent(
                new List <IPromotion>()
            {
                promotionTwo
            },
                promotionTree.GetAppendedPromotions()
                );
        }