Top Description Inners Fields Constructors Methods
io.vavr.test

public Class Property

extends Object
Class Inheritance
Imports
io.vavr.*, io.vavr.control.Option, .Try, java.util.Objects, .Random

A property builder which provides a fluent API to build checkable properties.
Author
Daniel Dietrich

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class
Property.CheckError

Internally used to provide more specific error messages.

pack-priv static class
Property.Condition

Internally used to model conditions composed of pre- and post-condition.

public static class
Property.ForAll1<
1st variable type of this for all quantor
T1
>

Represents a logical for all quantor.

public static class
Property.ForAll2<
1st variable type of this for all quantor
T1
,
2nd variable type of this for all quantor
T2
>

Represents a logical for all quantor.

public static class
Property.ForAll3<
1st variable type of this for all quantor
T1
,
2nd variable type of this for all quantor
T2
,
3rd variable type of this for all quantor
T3
>

Represents a logical for all quantor.

public static class
Property.ForAll4<
1st variable type of this for all quantor
T1
,
2nd variable type of this for all quantor
T2
,
3rd variable type of this for all quantor
T3
,
4th variable type of this for all quantor
T4
>

Represents a logical for all quantor.

public static class
Property.ForAll5<
1st variable type of this for all quantor
T1
,
2nd variable type of this for all quantor
T2
,
3rd variable type of this for all quantor
T3
,
4th variable type of this for all quantor
T4
,
5th variable type of this for all quantor
T5
>

Represents a logical for all quantor.

public static class
Property.ForAll6<
1st variable type of this for all quantor
T1
,
2nd variable type of this for all quantor
T2
,
3rd variable type of this for all quantor
T3
,
4th variable type of this for all quantor
T4
,
5th variable type of this for all quantor
T5
,
6th variable type of this for all quantor
T6
>

Represents a logical for all quantor.

public static class
Property.ForAll7<
1st variable type of this for all quantor
T1
,
2nd variable type of this for all quantor
T2
,
3rd variable type of this for all quantor
T3
,
4th variable type of this for all quantor
T4
,
5th variable type of this for all quantor
T5
,
6th variable type of this for all quantor
T6
,
7th variable type of this for all quantor
T7
>

Represents a logical for all quantor.

public static class
Property.ForAll8<
1st variable type of this for all quantor
T1
,
2nd variable type of this for all quantor
T2
,
3rd variable type of this for all quantor
T3
,
4th variable type of this for all quantor
T4
,
5th variable type of this for all quantor
T5
,
6th variable type of this for all quantor
T6
,
7th variable type of this for all quantor
T7
,
8th variable type of this for all quantor
T8
>

Represents a logical for all quantor.

public static class
Property.Property1<T1>

Represents a 1-ary checkable property.

public static class
Property.Property2<T1, T2>

Represents a 2-ary checkable property.

public static class
Property.Property3<T1, T2, T3>

Represents a 3-ary checkable property.

public static class
Property.Property4<T1, T2, T3, T4>

Represents a 4-ary checkable property.

public static class
Property.Property5<T1, T2, T3, T4, T5>

Represents a 5-ary checkable property.

public static class
Property.Property6<T1, T2, T3, T4, T5, T6>

Represents a 6-ary checkable property.

public static class
Property.Property7<T1, T2, T3, T4, T5, T6, T7>

Represents a 7-ary checkable property.

public static class
Property.Property8<T1, T2, T3, T4, T5, T6, T7, T8>

Represents a 8-ary checkable property.

Field Summary

Modifier and TypeField and Description
private final String

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private static Property.CheckError

Returns:

a new CheckError instance.
arbitraryError
(int
The position of the argument within the argument list of the property, starting with 1.
position
,
int
The size hint passed to the Arbitrary which caused the error.
size
,
Throwable
The error which occurred when the Arbitrary tried to obtain the generator Gen.
cause
)

Creates a CheckError caused by an exception when obtaining a generator.

public static Property

Returns:

a new Property
def
(String
property name
name
)

Defines a new Property.

public <
1st variable type of this for all quantor
T1
>
Property.ForAll1<T1>

Returns:

a new ForAll1 instance of 1 variables
forAll
(Arbitrary<T1>
1st variable of this for all quantor
a1
)

Returns a logical for all quantor of 1 given variables.

public <
1st variable type of this for all quantor
T1
,
2nd variable type of this for all quantor
T2
>
Property.ForAll2<T1, T2>

Returns:

a new ForAll2 instance of 2 variables
forAll
(Arbitrary<T1>
1st variable of this for all quantor
a1
,
Arbitrary<T2>
2nd variable of this for all quantor
a2
)

Returns a logical for all quantor of 2 given variables.

public <
1st variable type of this for all quantor
T1
,
2nd variable type of this for all quantor
T2
,
3rd variable type of this for all quantor
T3
>
Property.ForAll3<T1, T2, T3>

Returns:

a new ForAll3 instance of 3 variables
forAll
(Arbitrary<T1>
1st variable of this for all quantor
a1
,
Arbitrary<T2>
2nd variable of this for all quantor
a2
,
Arbitrary<T3>
3rd variable of this for all quantor
a3
)

Returns a logical for all quantor of 3 given variables.

public <
1st variable type of this for all quantor
T1
,
2nd variable type of this for all quantor
T2
,
3rd variable type of this for all quantor
T3
,
4th variable type of this for all quantor
T4
>
Property.ForAll4<T1, T2, T3, T4>

Returns:

a new ForAll4 instance of 4 variables
forAll
(Arbitrary<T1>
1st variable of this for all quantor
a1
,
Arbitrary<T2>
2nd variable of this for all quantor
a2
,
Arbitrary<T3>
3rd variable of this for all quantor
a3
,
Arbitrary<T4>
4th variable of this for all quantor
a4
)

Returns a logical for all quantor of 4 given variables.

public <
1st variable type of this for all quantor
T1
,
2nd variable type of this for all quantor
T2
,
3rd variable type of this for all quantor
T3
,
4th variable type of this for all quantor
T4
,
5th variable type of this for all quantor
T5
>
Property.ForAll5<T1, T2, T3, T4, T5>

Returns:

a new ForAll5 instance of 5 variables
forAll
(Arbitrary<T1>
1st variable of this for all quantor
a1
,
Arbitrary<T2>
2nd variable of this for all quantor
a2
,
Arbitrary<T3>
3rd variable of this for all quantor
a3
,
Arbitrary<T4>
4th variable of this for all quantor
a4
,
Arbitrary<T5>
5th variable of this for all quantor
a5
)

Returns a logical for all quantor of 5 given variables.

public <
1st variable type of this for all quantor
T1
,
2nd variable type of this for all quantor
T2
,
3rd variable type of this for all quantor
T3
,
4th variable type of this for all quantor
T4
,
5th variable type of this for all quantor
T5
,
6th variable type of this for all quantor
T6
>
Property.ForAll6<T1, T2, T3, T4, T5, T6>

Returns:

a new ForAll6 instance of 6 variables
forAll
(Arbitrary<T1>
1st variable of this for all quantor
a1
,
Arbitrary<T2>
2nd variable of this for all quantor
a2
,
Arbitrary<T3>
3rd variable of this for all quantor
a3
,
Arbitrary<T4>
4th variable of this for all quantor
a4
,
Arbitrary<T5>
5th variable of this for all quantor
a5
,
Arbitrary<T6>
6th variable of this for all quantor
a6
)

Returns a logical for all quantor of 6 given variables.

public <
1st variable type of this for all quantor
T1
,
2nd variable type of this for all quantor
T2
,
3rd variable type of this for all quantor
T3
,
4th variable type of this for all quantor
T4
,
5th variable type of this for all quantor
T5
,
6th variable type of this for all quantor
T6
,
7th variable type of this for all quantor
T7
>
Property.ForAll7<T1, T2, T3, T4, T5, T6, T7>

Returns:

a new ForAll7 instance of 7 variables
forAll
(Arbitrary<T1>
1st variable of this for all quantor
a1
,
Arbitrary<T2>
2nd variable of this for all quantor
a2
,
Arbitrary<T3>
3rd variable of this for all quantor
a3
,
Arbitrary<T4>
4th variable of this for all quantor
a4
,
Arbitrary<T5>
5th variable of this for all quantor
a5
,
Arbitrary<T6>
6th variable of this for all quantor
a6
,
Arbitrary<T7>
7th variable of this for all quantor
a7
)

Returns a logical for all quantor of 7 given variables.

public <
1st variable type of this for all quantor
T1
,
2nd variable type of this for all quantor
T2
,
3rd variable type of this for all quantor
T3
,
4th variable type of this for all quantor
T4
,
5th variable type of this for all quantor
T5
,
6th variable type of this for all quantor
T6
,
7th variable type of this for all quantor
T7
,
8th variable type of this for all quantor
T8
>
Property.ForAll8<T1, T2, T3, T4, T5, T6, T7, T8>

Returns:

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

Returns a logical for all quantor of 8 given variables.

private static Property.CheckError

Returns:

a new CheckError instance.
genError
(int
The position of the argument within the argument list of the property, starting with 1.
position
,
int
The size hint of the arbitrary which called the generator Gen which caused the error.
size
,
Throwable
The error which occurred when the Gen tried to generate a random value.
cause
)

Creates a CheckError caused by an exception when generating a value.

private static void
log(String msg)

private static void
logErroneous(String name, int currentTry, long millis, String errorMessage)

private static void
logFalsified(String name, int currentTry, long millis)

private static void
logSatisfied(String name, int tries, long millis, boolean exhausted)

private static Property.CheckError

Returns:

a new CheckError instance.
predicateError
(Throwable
The error which occurred when applying the java.util.function.Predicate.
cause
)

Creates a CheckError caused by an exception when testing a Predicate.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait