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
TThe type of value pooled.
- Inheritance
-
Pool<T>
- Inherited Members
Constructors
Pool(TestCase)
A pool for the test case tc.
public Pool(TestCase tc)
Parameters
tcTestCase
Properties
Count
How many values the pool holds.
public int Count { get; }
Property Value
IsEmpty
Whether the pool holds no values.
public bool IsEmpty { get; }
Property Value
Methods
Add(T)
Add value.
public void Add(T value)
Parameters
valueT
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
Reusable()
A generator drawing a value that stays in the pool. Rejects the test case while the pool is empty.
public PrintableGenerator<T> Reusable()