copy

abstract fun copy(newScope: MokkeryScope? = null, block: MockFactoryConfigurer.Block = { }): MockFactory(source)

Copies a factory with given configuration block applied.

If newScope is provided, then original factory configuration is rejected. Only ability to create mocks of specified types is preserved. New configuration is based on newScope and block only.