@@ -0,0 +1,2680 @@
+/*%0A The MIT License%0A%0A Copyright (c) 2010-2017 Paul R. Holser, Jr.%0A%0A Permission is hereby granted, free of charge, to any person obtaining%0A a copy of this software and associated documentation files (the%0A %22Software%22), to deal in the Software without restriction, including%0A without limitation the rights to use, copy, modify, merge, publish,%0A distribute, sublicense, and/or sell copies of the Software, and to%0A permit persons to whom the Software is furnished to do so, subject to%0A the following conditions:%0A%0A The above copyright notice and this permission notice shall be%0A included in all copies or substantial portions of the Software.%0A%0A THE SOFTWARE IS PROVIDED %22AS IS%22, WITHOUT WARRANTY OF ANY KIND,%0A EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF%0A MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND%0A NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE%0A LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION%0A OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION%0A WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.%0A*/%0A%0Apackage com.pholser.junit.quickcheck;%0A%0Aimport com.pholser.junit.quickcheck.generator.Also;%0Aimport com.pholser.junit.quickcheck.generator.Only;%0Aimport com.pholser.junit.quickcheck.runner.JUnitQuickcheck;%0Aimport org.junit.Ignore;%0Aimport org.junit.runner.RunWith;%0A%0Aimport static com.pholser.junit.quickcheck.Mode.*;%0A%0A@Ignore(%22For demonstration purposes only%22)%0A@RunWith(JUnitQuickcheck.class)%0Apublic class OnlyAlsoTest %7B%0A    public enum Response %7B YES, NO, UNSURE %7D%0A%0A    @Property(trials = 45) public void samplingOnly(%0A        @Only(%7B%223%22, %224%22%7D) int arg0,%0A        @Only(%22false%22) boolean arg1,%0A        @Only(%22YES%22) Response arg2,%0A        @Only(%7B%221%22, %222%22, %220%22, %22-1%22%7D) int arg3) %7B%0A%0A        System.out.printf(%22%25d %25s %25s %25d%5Cn%22, arg0, arg1, arg2, arg3);%0A    %7D%0A%0A    @Property(trials = 32) public void samplingAlso(%0A        @Also(%7B%223%22, %224%22%7D) int arg0,%0A        @Also(%22false%22) boolean arg1,%0A        @Also(%22YES%22) Response arg2,%0A        @Also(%7B%221%22, %222%22, %220%22, %22-1%22%7D) int arg3) %7B%0A%0A        System.out.printf(%22%25d %25s %25s %25d%5Cn%22, arg0, arg1, arg2, arg3);%0A    %7D%0A%0A    @Property(trials = 11, mode = EXHAUSTIVE)%0A    public void exhaustiveOnly(%0A        int arg0,%0A        boolean arg1,%0A        Response arg2,%0A        @Only(%7B%221%22, %222%22, %220%22, %22-1%22%7D) int arg3) %7B%0A%0A        System.out.printf(%22%25d %25s %25s %25d%5Cn%22, arg0, arg1, arg2, arg3);%0A    %7D%0A%0A    @Property(trials = 11, mode = EXHAUSTIVE)%0A    public void exhaustiveAlso(%0A        int arg0,%0A        boolean arg1,%0A        Response arg2,%0A        @Also(%7B%221%22, %222%22, %220%22, %22-1%22%7D) int arg3) %7B%0A%0A        System.out.printf(%22%25d %25s %25s %25d%5Cn%22, arg0, arg1, arg2, arg3);%0A    %7D%0A%7D%0A

Add demonstration tests for Only/Also