Examples of BoxGenerator


Examples of com.pholser.junit.quickcheck.test.generator.BoxGenerator

    @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

Examples of com.pholser.junit.quickcheck.test.generator.BoxGenerator

            (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);
        Generator<?> callableResultGenerator = callableGenerator.componentGenerators().get(0);
        assertGenerators(callableResultGenerator, ZilchGenerator.class);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.