public IOrderProcess GetProductRuleInstance(ProductType productType) { IOrderProcess orderRule; switch (productType) { case ProductType.PhysicalProduct: orderRule = new PhysicalProductRule(); break; case ProductType.Book: orderRule = new BookRule(); break; case ProductType.Membership: orderRule = new MembershipRule(); break; case ProductType.MembershipUpgrade: orderRule = new MembershipUpgradeRule(); break; case ProductType.Video: orderRule = new VideoRule(); break; default: orderRule = new NewProductRule(); break; } return(orderRule); }
public MembershipUpgradeRuleTest() { mockMembership = new Mock <IMembership>(); _membershipUpgradeRule = new MembershipUpgradeRule(); }