Class FixtureRepeater

Namespace: AutoFixture
Assembly: AutoFixture.dll

Contains extension methods for repeating a function in IFixture instances.

public static class FixtureRepeater

Inheritance

objectFixtureRepeater

Inherited Members

object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Methods

Repeat<T>(IFixture, Func<T>)

Repeats a function many times.

public static IEnumerable<T> Repeat<T>(this IFixture fixture, Func<T> function)

Parameters

fixture IFixture

The IFixtureto use.

function Func<T>

A function that creates an instance of T.

Returns

IEnumerable<T>

A sequence of objects created by function.

Type Parameters

T

The type of object that function creates.

Remarks

The number of times function is invoked is determined by `RepeatCount`.