Table of Contents

Class Pool<T>

Namespace
Hegel
Assembly
Hegel.dll

Values a stateful test has created, for later rules to draw from: the engine chooses which, and shrinks towards fewer and earlier values. One pool belongs to one test case.

public sealed class Pool<T>

Type Parameters

T

The type of value pooled.

Inheritance
Pool<T>
Inherited Members

Constructors

Pool(TestCase)

A pool for the test case tc.

public Pool(TestCase tc)

Parameters

tc TestCase

Properties

Count

How many values the pool holds.

public int Count { get; }

Property Value

int

IsEmpty

Whether the pool holds no values.

public bool IsEmpty { get; }

Property Value

bool

Methods

Add(T)

Add value.

public void Add(T value)

Parameters

value T

Consuming()

A generator drawing a value and removing it from the pool. Rejects the test case while the pool is empty.

public PrintableGenerator<T> Consuming()

Returns

PrintableGenerator<T>

Reusable()

A generator drawing a value that stays in the pool. Rejects the test case while the pool is empty.

public PrintableGenerator<T> Reusable()

Returns

PrintableGenerator<T>