Exemplo n.º 1
0
        public static PurchaseOrderItemBuilder WithNonSerializedPartDefaults(this PurchaseOrderItemBuilder @this, Part nonUnifiedPart)
        {
            var faker = @this.Session.Faker();

            @this.WithDescription(faker.Lorem.Sentences(2));
            @this.WithInvoiceItemType(new InvoiceItemTypes(@this.Session).PartItem);
            @this.WithPart(nonUnifiedPart);
            @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);
        }
Exemplo n.º 2
0
        public static PurchaseOrderItemBuilder WithSerializedPartDefaults(this PurchaseOrderItemBuilder @this, Part unifiedGood, SerialisedItem serialisedItem, Organisation internalOrganisation)
        {
            var faker = @this.Session.Faker();

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

            return(@this);
        }