Click or drag to resize

ComposedFixtureAddServiceFixtureTService Method

Namespace:  Neon.Xunit
Assembly:  Neon.Xunit (in Neon.Xunit.dll) Version: 2.14.0
Syntax
public void AddServiceFixture<TService>(
	string name,
	NeonServiceFixture<TService> subFixture,
	Func<TService> serviceCreator,
	ServiceMap serviceMap = null,
	TimeSpan startTimeout = null,
	int group = -1
)
where TService : NeonService

Parameters

name
Type: SystemString
The fixture name (case insenstitive).
subFixture
Type: Neon.XunitNeonServiceFixtureTService
The subfixture being added.
serviceCreator
Type: SystemFuncTService

Callback that creates and returns the new service instance.

serviceMap (Optional)
Type: Neon.ServiceServiceMap
Optionally specifies a ServiceMap. When a service map is passed and there's a ServiceDescription for the created service, then the fixture will configure the service with TestEnvironmentVariables, TestBinaryConfigFiles, and TestTextConfigFiles before starting the service.
startTimeout (Optional)
Type: SystemTimeSpan
Optionally specifies maximum time to wait for the service to transition to the running state.
group (Optional)
Type: SystemInt32
Optionally specifies the fixture group. Fixtures with group=-1 (the default) will be started one by one before all other fixtures. Fixtures with a group >= 0 will be started in parallel by group starting at the lowest group. All of the fixtures in the same group will be started in parallel on separate threads and the ComposedFixture will wait until all fixtures in a group have started before advancing to the next group.

Type Parameters

TService
The service type (derived from NeonService).
See Also