private static ProviderVariationContext NewVariationContext(Action <ProviderVariationContextBuilder> setUp)
        {
            ProviderVariationContextBuilder variationContextBuilder = new ProviderVariationContextBuilder();

            setUp(variationContextBuilder);

            return(variationContextBuilder.Build());
        }
示例#2
0
        private ProviderVariationContext NewVariationContext(Action <ProviderVariationContextBuilder> setUp = null)
        {
            decimal totalFunding = new RandomNumberBetween(100, 100000);

            ProviderVariationContextBuilder variationContextBuilder = new ProviderVariationContextBuilder()
                                                                      .WithPublishedProvider(NewPublishedProvider(_ => _.WithReleased(NewPublishedProviderVersion(ppv =>
                                                                                                                                                                  ppv.WithTotalFunding(totalFunding)))))
                                                                      .WithCurrentState(NewProvider(_ => _.WithStatus(Variation.Closed)))
                                                                      .WithUpdatedTotalFunding(totalFunding);

            setUp?.Invoke(variationContextBuilder);

            return(variationContextBuilder.Build());
        }