Interface IExpansion<T>

Namespace: AutoFixture.Idioms
Assembly: AutoFixture.Idioms.dll

Represents an operation that somehow expands a single value into a sequence.

public interface IExpansion<T>

Type Parameters

T

The type of item being expanded.

Methods

Expand(T)

Expands a value into a sequence of values.

IEnumerable<T> Expand(T value)

Parameters

value T

The value to expand.

Returns

IEnumerable<T>

A sequence of values.

Remarks

In a sense, an expansion is the opposite as an aggregation. Given a single value the result is a sequence produced from the value. There's no inherent definition on how such a sequence is produced or what the values in the sequence will be. value may or may not be contained in the result.

Implementations could, for example, simply produce a sequence with the input value as the single element, or it could produce a sequence where the input value is repeated a number of times. Other options are also possible.