Skip to content

ItemBuilder<TFixtureItem,TPathProvider>.With method

Configure a member. To configure the member use a lambda.

csharp
new ItemBuilder<Car>()
    .With(p => p.Engine.CylinderCount.Value(4))
    .Build();
new ItemBuilder<Car>()
    .With(p => p.Engine.CylinderCount.Value(4))
    .Build();
csharp
public ItemBuilder With(Func<TPathProvider, MemberConfig<TFixtureItem>> func)
public ItemBuilder With(Func<TPathProvider, MemberConfig<TFixtureItem>> func)
parameterdescription
funcA function which returns an MemberConfig. The function parameter provides access to MemberPath every member path provides methods for configure the member for example: .Value().

Return Value

Itself for further configuration or for building the instance.

See Also