Package com.pholser.junit.quickcheck.internal.generator

Examples of com.pholser.junit.quickcheck.internal.generator.GeneratorRepository


    public static class FakeList<T> {
    }

    @Test public void autoGeneratorDoesNotAllowItselfToBeRegistered() {
        GeneratorRepository repo = new GeneratorRepository(null);

        repo.register(new Fields<>(Object.class));

        thrown.expect(IllegalArgumentException.class);
        repo.generatorFor(Object.class);
    }
View Full Code Here


public class SupplyingCallableGeneratorWithComponentTest {
    private GeneratorRepository repo;
    @Mock private SourceOfRandomness random;

    @Before public void beforeEach() {
        repo = new GeneratorRepository(random)
            .register(Arrays.<Generator<?>> asList(
                new ZilchGenerator(),
                new TestCallableGenerator(),
                new BoxGenerator()));
        when(random.nextInt(0, 2)).thenReturn(1);
View Full Code Here

    /* Called by JUnit reflectively. */
    public RandomValueSupplier() {
        generator = new RandomTheoryParameterGenerator(
            new SourceOfRandomness(new SecureRandom()),
            new GeneratorRepository(new SourceOfRandomness(new SecureRandom()))
                .register(new ServiceLoaderGeneratorSource()));
    }
View Full Code Here

            return f;
        }
    }

    @Test public void autoGeneratorDoesNotAllowItselfToBeRegistered() {
        GeneratorRepository repo = new GeneratorRepository(null);

        repo.register(new Ctor<>(Object.class));

        thrown.expect(IllegalArgumentException.class);
        repo.generatorFor(Object.class);
    }
View Full Code Here

TOP

Related Classes of com.pholser.junit.quickcheck.internal.generator.GeneratorRepository

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.