Esempio n. 1
0
        static void Main(string[] args)
        {
            //Physical Product Use Case
            var PhysicalProductPayment = new PhysicalProduct();

            Console.WriteLine(PhysicalProductPayment.ApplyRules());

            //Book Use case
            var BookPayment = new Book();

            Console.WriteLine(BookPayment.ApplyRules());

            //Membership use case
            var MembershipPayment = new Membership();

            Console.WriteLine(MembershipPayment.ApplyRules("Activation"));

            //Video use case
            var VideoPayment = new Video("Learning to Ski");

            Console.WriteLine(VideoPayment.ApplyRules());

            Console.ReadKey();
        }
        public void IfPaymentIsPhysicalProduct()
        {
            IEntity Product = new PhysicalProduct();

            Assert.Equal(new GeneratePackingSlipForShipping().RuleImplementation() + new CommissionPayment().RuleImplementation(), Product.ApplyRules());
        }