示例#1
0
        public void It_works_correctly_with_any_algorithm(bool toggle, bool anyOrderCancellationContent)
        {
            // given
            _toggleRouter.SetFeature("next-gen-ecomm", toggle);
            var factory = FeatureAwareFactory.CreateFeatureAwareFactoryBasedOn(_featureDecisions);
            var emailer = factory.CreateInvoiceEmailer(new Invoice());

            // when
            var email = emailer.GenerateInvoiceEmail();

            // then
            VerifyEmailContent(email, anyOrderCancellationContent);
        }
 public static FeatureAwareFactory CreateFeatureAwareFactoryBasedOn(FeatureDecisions featureDecisions)
 => _factory ?? (_factory = new FeatureAwareFactory(featureDecisions));