emblem.emblematic.traversors.sync
creates a simple CustomGenerator from a regular function.
creates a simple CustomGenerator from a regular function. the simple generator wraps the function in a type-check, to make sure the type requested is equivalent to the return type of the underlying function. Example usage:
class IntHolder(val i: Int) val intHolderGen: CustomGenerator[IntHolder] = simpleGenerator((generator: Generator) => new IntHolder(generator.generate[Int])) val generator = new TestDataGenerator(customGeneratorPool = CustomGeneratorPool.empty + intHolderGen)
the return type of the underlying function
the regular function backing the custom generator
a simple custom generator backed by the provided underlying function