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

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


                new BoxGenerator()));
        when(random.nextInt(0, 2)).thenReturn(1);
    }

    @Test public void coaxingGeneratorToSupplyComponentForCallable() {
        ArrayGenerator generator =
            (ArrayGenerator) repo.generatorFor(
                new GenericArrayTypeImpl(parameterized(Box.class).on(extendsOf(Object.class))));

        Generator<?> arrayElementGenerator = generator.componentGenerator();
        assertGenerators(arrayElementGenerator, BoxGenerator.class);
        BoxGenerator boxGenerator = (BoxGenerator) componentOf(arrayElementGenerator, 0);
        Generator<?> listElementGenerator = boxGenerator.componentGenerators().get(0);
        assertGenerators(listElementGenerator, TestCallableGenerator.class);
        TestCallableGenerator<?> callableGenerator = (TestCallableGenerator<?>) componentOf(listElementGenerator, 0);
View Full Code Here

TOP

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

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.