Table of Contents

Class MapGenerator<TKey, TValue>

Namespace
Hegel
Assembly
Hegel.dll

Draws dictionaries from key and value generators.

public sealed class MapGenerator<TKey, TValue> : PrintableGenerator<Dictionary<TKey, TValue>> where TKey : notnull

Type Parameters

TKey
TValue
Inheritance
Generator<Dictionary<TKey, TValue>>
MapGenerator<TKey, TValue>
Inherited Members

Properties

Label

The span label the engine files this generator's draws under. Defaults to a label derived from the class's full name.

public override ulong Label { get; }

Property Value

ulong

Methods

DoDraw(TestCase)

Draw one value. Called inside a span labelled Label: draw from another generator through DrawSilent<T>(Generator<T>), which opens its span, rather than by calling its hook.

protected override Dictionary<TKey, TValue> DoDraw(TestCase tc)

Parameters

tc TestCase

Returns

Dictionary<TKey, TValue>

DoDrawAndPrint(TestCase, Printer)

Draw one value, printing it to printer (which may be Noop). Draw its parts through DrawAndPrint<T>(Generator<T>, Printer).

protected override Dictionary<TKey, TValue> DoDrawAndPrint(TestCase tc, Printer printer)

Parameters

tc TestCase
printer Printer

Returns

Dictionary<TKey, TValue>

MaxSize(int)

At most maxSize entries.

public MapGenerator<TKey, TValue> MaxSize(int maxSize)

Parameters

maxSize int

Returns

MapGenerator<TKey, TValue>

MinSize(int)

At least minSize entries.

public MapGenerator<TKey, TValue> MinSize(int minSize)

Parameters

minSize int

Returns

MapGenerator<TKey, TValue>