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)
parameter | description |
---|---|
func | A 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
- class MemberConfig<TFixtureItem>
- class ItemBuilder<TFixtureItem,TPathProvider>
- namespace Twizzar.Fixture