Package io.vavr.test

Class Property

java.lang.Object
io.vavr.test.Property

public class Property extends Object
A property builder which provides a fluent API to build checkable properties.
  • Method Details

    • def

      public static Property def(String name)
      Defines a new Property.
      Parameters:
      name - property name
      Returns:
      a new Property
      Throws:
      NullPointerException - if name is null.
      IllegalArgumentException - if name is empty or consists of whitespace only
    • forAll

      public <T1> Property.ForAll1<T1> forAll(Arbitrary<T1> a1)
      Returns a logical for all quantor of 1 given variables.
      Type Parameters:
      T1 - 1st variable type of this for all quantor
      Parameters:
      a1 - 1st variable of this for all quantor
      Returns:
      a new ForAll1 instance of 1 variables
    • forAll

      public <T1, T2> Property.ForAll2<T1,T2> forAll(Arbitrary<T1> a1, Arbitrary<T2> a2)
      Returns a logical for all quantor of 2 given variables.
      Type Parameters:
      T1 - 1st variable type of this for all quantor
      T2 - 2nd variable type of this for all quantor
      Parameters:
      a1 - 1st variable of this for all quantor
      a2 - 2nd variable of this for all quantor
      Returns:
      a new ForAll2 instance of 2 variables
    • forAll

      public <T1, T2, T3> Property.ForAll3<T1,T2,T3> forAll(Arbitrary<T1> a1, Arbitrary<T2> a2, Arbitrary<T3> a3)
      Returns a logical for all quantor of 3 given variables.
      Type Parameters:
      T1 - 1st variable type of this for all quantor
      T2 - 2nd variable type of this for all quantor
      T3 - 3rd variable type of this for all quantor
      Parameters:
      a1 - 1st variable of this for all quantor
      a2 - 2nd variable of this for all quantor
      a3 - 3rd variable of this for all quantor
      Returns:
      a new ForAll3 instance of 3 variables
    • forAll

      public <T1, T2, T3, T4> Property.ForAll4<T1,T2,T3,T4> forAll(Arbitrary<T1> a1, Arbitrary<T2> a2, Arbitrary<T3> a3, Arbitrary<T4> a4)
      Returns a logical for all quantor of 4 given variables.
      Type Parameters:
      T1 - 1st variable type of this for all quantor
      T2 - 2nd variable type of this for all quantor
      T3 - 3rd variable type of this for all quantor
      T4 - 4th variable type of this for all quantor
      Parameters:
      a1 - 1st variable of this for all quantor
      a2 - 2nd variable of this for all quantor
      a3 - 3rd variable of this for all quantor
      a4 - 4th variable of this for all quantor
      Returns:
      a new ForAll4 instance of 4 variables
    • forAll

      public <T1, T2, T3, T4, T5> Property.ForAll5<T1,T2,T3,T4,T5> forAll(Arbitrary<T1> a1, Arbitrary<T2> a2, Arbitrary<T3> a3, Arbitrary<T4> a4, Arbitrary<T5> a5)
      Returns a logical for all quantor of 5 given variables.
      Type Parameters:
      T1 - 1st variable type of this for all quantor
      T2 - 2nd variable type of this for all quantor
      T3 - 3rd variable type of this for all quantor
      T4 - 4th variable type of this for all quantor
      T5 - 5th variable type of this for all quantor
      Parameters:
      a1 - 1st variable of this for all quantor
      a2 - 2nd variable of this for all quantor
      a3 - 3rd variable of this for all quantor
      a4 - 4th variable of this for all quantor
      a5 - 5th variable of this for all quantor
      Returns:
      a new ForAll5 instance of 5 variables
    • forAll

      public <T1, T2, T3, T4, T5, T6> Property.ForAll6<T1,T2,T3,T4,T5,T6> forAll(Arbitrary<T1> a1, Arbitrary<T2> a2, Arbitrary<T3> a3, Arbitrary<T4> a4, Arbitrary<T5> a5, Arbitrary<T6> a6)
      Returns a logical for all quantor of 6 given variables.
      Type Parameters:
      T1 - 1st variable type of this for all quantor
      T2 - 2nd variable type of this for all quantor
      T3 - 3rd variable type of this for all quantor
      T4 - 4th variable type of this for all quantor
      T5 - 5th variable type of this for all quantor
      T6 - 6th variable type of this for all quantor
      Parameters:
      a1 - 1st variable of this for all quantor
      a2 - 2nd variable of this for all quantor
      a3 - 3rd variable of this for all quantor
      a4 - 4th variable of this for all quantor
      a5 - 5th variable of this for all quantor
      a6 - 6th variable of this for all quantor
      Returns:
      a new ForAll6 instance of 6 variables
    • forAll

      public <T1, T2, T3, T4, T5, T6, T7> Property.ForAll7<T1,T2,T3,T4,T5,T6,T7> forAll(Arbitrary<T1> a1, Arbitrary<T2> a2, Arbitrary<T3> a3, Arbitrary<T4> a4, Arbitrary<T5> a5, Arbitrary<T6> a6, Arbitrary<T7> a7)
      Returns a logical for all quantor of 7 given variables.
      Type Parameters:
      T1 - 1st variable type of this for all quantor
      T2 - 2nd variable type of this for all quantor
      T3 - 3rd variable type of this for all quantor
      T4 - 4th variable type of this for all quantor
      T5 - 5th variable type of this for all quantor
      T6 - 6th variable type of this for all quantor
      T7 - 7th variable type of this for all quantor
      Parameters:
      a1 - 1st variable of this for all quantor
      a2 - 2nd variable of this for all quantor
      a3 - 3rd variable of this for all quantor
      a4 - 4th variable of this for all quantor
      a5 - 5th variable of this for all quantor
      a6 - 6th variable of this for all quantor
      a7 - 7th variable of this for all quantor
      Returns:
      a new ForAll7 instance of 7 variables
    • forAll

      public <T1, T2, T3, T4, T5, T6, T7, T8> Property.ForAll8<T1,T2,T3,T4,T5,T6,T7,T8> forAll(Arbitrary<T1> a1, Arbitrary<T2> a2, Arbitrary<T3> a3, Arbitrary<T4> a4, Arbitrary<T5> a5, Arbitrary<T6> a6, Arbitrary<T7> a7, Arbitrary<T8> a8)
      Returns a logical for all quantor of 8 given variables.
      Type Parameters:
      T1 - 1st variable type of this for all quantor
      T2 - 2nd variable type of this for all quantor
      T3 - 3rd variable type of this for all quantor
      T4 - 4th variable type of this for all quantor
      T5 - 5th variable type of this for all quantor
      T6 - 6th variable type of this for all quantor
      T7 - 7th variable type of this for all quantor
      T8 - 8th variable type of this for all quantor
      Parameters:
      a1 - 1st variable of this for all quantor
      a2 - 2nd variable of this for all quantor
      a3 - 3rd variable of this for all quantor
      a4 - 4th variable of this for all quantor
      a5 - 5th variable of this for all quantor
      a6 - 6th variable of this for all quantor
      a7 - 7th variable of this for all quantor
      a8 - 8th variable of this for all quantor
      Returns:
      a new ForAll8 instance of 8 variables