All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.insightfullogic.lambdabehave.generators.GeneratedDescription Maven / Gradle / Ivy

There is a newer version: 0.4
Show newest version
package com.insightfullogic.lambdabehave.generators;

import com.insightfullogic.lambdabehave.specifications.Column;
import com.insightfullogic.lambdabehave.specifications.ThreeColumns;
import com.insightfullogic.lambdabehave.specifications.TwoColumns;

/**
 * A fluent builder interface for describing how test cases get generated.
 */
public interface GeneratedDescription {

    /**
     * Set a new source generator.
     *
     * The source generator is the component which provides a source of numbers, upon which random test
     * case generation is performed.
     *
     * If not set the default will generate random numbers.
     *
     * @param sourceGenerator the new source generator
     * @return this
     */
    GeneratedDescription withSource(SourceGenerator sourceGenerator);

    /**
     * Use this generator to produce a single column of example testcases.
     *
     * @param generator the generator to use to produce the test case values
     * @param  the type of the values in column
     * @return this
     */
     Column example(Generator generator);

    /**
     * Use these generators to produce two columns of example testcases.
     *
     * @param firstGenerator the generator to use to produce the first column of test case values
     * @param secondGenerator the generator to use to produce the second column of test case values
     * @param  the type of the values in the first column
     * @param  the type of the values in the second column
     * @return this
     */
     TwoColumns example(
            Generator firstGenerator,
            Generator secondGenerator);

    /**
     * Use these generators to produce three columns of example testcases.
     *
     * @param firstGenerator the generator to use to produce the first column of test case values
     * @param secondGenerator the generator to use to produce the second column of test case values
     * @param thirdGenerator the generator to use to produce the third column of test case values
     * @param  the type of the values in the first column
     * @param  the type of the values in the second column
     * @param  the type of the values in the third column
     * @return this
     */
     ThreeColumns example(
            Generator firstGenerator,
            Generator secondGenerator,
            Generator thirdGenerator);

}