Package com.pholser.junit.quickcheck.reflect

Examples of com.pholser.junit.quickcheck.reflect.GenericArrayTypeImpl


    }

    @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);
View Full Code Here


        when(randomForParameterGenerator.nextLong()).thenReturn(1L).thenReturn(7L).thenReturn(63L);
        when(randomForGeneratorRepo.nextInt(0, Iterables.size(source) - 1)).thenReturn(longIndex);
    }

    @Override protected Type parameterType() {
        return new GenericArrayTypeImpl(parameterized(Box.class).on(extendsOf(Object.class)));
    }
View Full Code Here

        repo.generatorFor(parameterized(List.class).on(extendsOf(typeVariable)));
    }

    @Test(expected = TypeValidationException.class)
    public void withTypeVariableInGenericArrayType() {
        repo.generatorFor(new GenericArrayTypeImpl(typeVariable));
    }
View Full Code Here

TOP

Related Classes of com.pholser.junit.quickcheck.reflect.GenericArrayTypeImpl

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.