示例#1
0
        public static InvoiceTermBuilder WithDefaultsForPaymentNetDays(this InvoiceTermBuilder @this)
        {
            var faker = @this.Session.Faker();

            @this.WithTermValue(faker.Random.Int(7, 30).ToString());
            @this.WithTermType(new InvoiceTermTypes(@this.Session).PaymentNetDays);
            @this.WithDescription(faker.Lorem.Sentence());

            return(@this);
        }
        public static InvoiceTermBuilder WithDefaults(this InvoiceTermBuilder @this)
        {
            var faker = @this.Session.Faker();

            @this.WithTermValue(faker.Lorem.Sentence());
            @this.WithTermType(faker.Random.ListItem(@this.Session.Extent <InvoiceTermType>()));
            @this.WithDescription(faker.Lorem.Sentence());

            return(@this);
        }
示例#3
0
        public static InvoiceTermBuilder WithDefaults(this InvoiceTermBuilder @this)
        {
            var faker = @this.Session.Faker();

            var allInvoiceItemTypes = @this.Session.Extent <InvoiceTermType>().ToList();
            var invoiceItemTypes    = allInvoiceItemTypes.Except(allInvoiceItemTypes.Where(v => v.UniqueId == InvoiceTermTypes.PaymentNetDaysId).ToList()).ToList();

            @this.WithTermValue(faker.Lorem.Sentence());
            @this.WithTermType(faker.Random.ListItem(invoiceItemTypes));
            @this.WithDescription(faker.Lorem.Sentence());

            return(@this);
        }