Example #1
0
        public static PurchaseOrderItemBuilder WithNonSerializedPartDefaults(this PurchaseOrderItemBuilder @this, Part nonUnifiedPart, Organisation internalOrganisation)
        {
            var faker = @this.Session.Faker();

            @this.WithDescription(faker.Lorem.Sentences(2));
            @this.WithInvoiceItemType(new InvoiceItemTypes(@this.Session).PartItem);
            @this.WithPart(nonUnifiedPart);
            @this.WithStoredInFacility(faker.Random.ListItem(internalOrganisation.FacilitiesWhereOwner));
            @this.WithAssignedUnitPrice(faker.Random.UInt(5, 10));
            @this.WithQuantityOrdered(faker.Random.UInt(5, 15));
            @this.WithAssignedDeliveryDate(@this.Session.Now().AddDays(5));
            @this.WithShippingInstruction(faker.Lorem.Sentences(3));
            @this.WithComment(faker.Lorem.Sentence());
            @this.WithInternalComment(faker.Lorem.Sentence());
            @this.WithMessage(faker.Lorem.Sentence());

            return(@this);
        }