Package com.pholser.junit.quickcheck.test.generator

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


        static int iterations;

        @Theory public void shouldHold(@ForAll Function<Foo, Zilch> f) {
            ++iterations;

            Foo foo = new Foo(2);
            Zilch result = f.apply(foo);

            for (int i = 0; i < 10000; ++i)
                assertEquals(result, f.apply(foo));
        }
View Full Code Here


        static int iterations;

        @Theory public void shouldHold(@ForAll Function<? super Foo, ? extends Zilch> f) {
            ++iterations;

            Foo foo = new Foo(2);
            Zilch result = f.apply(foo);

            for (int i = 0; i < 10000; ++i)
                assertEquals(result, f.apply(foo));
        }
View Full Code Here

        static int iterations;

        @Theory public void shouldHold(@ForAll FooUnboxer b) {
            ++iterations;

            @SuppressWarnings("unchecked")
            Foo value = functionValue(new FooGenerator(), new Object[] { new Box<>(new Foo(2)) });
            for (int i = 0; i < 10000; ++i)
                assertEquals(value, b.unbox(new Box<>(new Foo(2))));
        }
View Full Code Here

TOP

Related Classes of com.pholser.junit.quickcheck.test.generator.Foo

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.