Class InstancioArgumentsGeneratorFactory

java.lang.Object
edu.berkeley.cs.jqf.fuzz.instancio.InstancioArgumentsGeneratorFactory
All Implemented Interfaces:
ArgumentsGeneratorFactory

public final class InstancioArgumentsGeneratorFactory extends Object implements ArgumentsGeneratorFactory
Builds Instancio-backed ArgumentsGenerators.

This is a second reference provider, alongside the junit-quickcheck one. It exists to show that ArgumentsGeneratorFactory is generation-library agnostic: the engine and both run paths drive it without depending on Instancio. It is discovered through ServiceLoader, or selected per test with @FuzzTest(arguments = InstancioArgumentsGeneratorFactory.class).

Instancio is a seed-based generator, so Zest steers it through a single seed per parameter rather than a byte-by-byte decoding. That gives coarser control than junit-quickcheck; see the module README for the trade-off.

  • Constructor Details

    • InstancioArgumentsGeneratorFactory

      public InstancioArgumentsGeneratorFactory()
  • Method Details

    • create

      public ArgumentsGenerator create(Class<?> testClass, Method testMethod)
      Description copied from interface: ArgumentsGeneratorFactory
      Creates a generator bound to the given test method.
      Specified by:
      create in interface ArgumentsGeneratorFactory
      Parameters:
      testClass - the class declaring the test method
      testMethod - the test method whose arguments will be generated
      Returns:
      a generator for the method's parameters