Adds jqwik arbitraries for Vavr data structures:
-
io.vavr.collection.Iterator
-
io.vavr.collection.Stream
-
io.vavr.collection.Seq
-
io.vavr.collection.LinearSeq
-
io.vavr.collection.List
-
io.vavr.collection.Queue
-
io.vavr.collection.PriorityQueue
-
io.vavr.collection.IndexedSeq
-
io.vavr.collection.Array
-
io.vavr.collection.Vector
-
io.vavr.collection.CharSeq
-
io.vavr.collection.Set
-
io.vavr.collection.HashSet
-
io.vavr.collection.LinkedHashSet
-
io.vavr.collection.SortedSet
-
io.vavr.collection.TreeSet
-
io.vavr.collection.BitSet
(in the future) -
io.vavr.collection.Tree
-
io.vavr.collection.Map
-
io.vavr.collection.HashMap
-
io.vavr.collection.LinkedHashMap
-
io.vavr.collection.SortedMap
-
io.vavr.collection.TreeMap
-
io.vavr.collection.Multimap
-
io.vavr.collection.HashMultimap
-
io.vavr.collection.LinkedHashMultimap
-
io.vavr.collection.SortedMultimap
-
io.vavr.collection.TreeMultimap
-
io.vavr.Lazy
-
io.vavr.control.Option
-
io.vavr.control.Either
-
io.vavr.control.Try
-
io.vavr.control.Validation
-
io.vavr.concurrent.Future
@Property
void generateDistinctLists(@ForAll final io.vavr.collection.List<@Unique Integer> list) {
assertThat(list.distinct().size(), is(list.size()));
}
@Provide
Arbitrary<io.vavr.collection.List<Integer>> integersMin3() {
return VavrArbitraries.list(Arbitraries.integers()).ofMinSize(3);
}
@Property
void generateSizableListFrom(@ForAll @From("integersMin3") final io.vavr.collection.List<Integer> list) {
assertThat(list.size(), is(greaterThanOrEqualTo(3)));
}
jqwik-vavr | jqwik | vavr |
---|---|---|
1.0.0 | 1.3.6 | 0.10.3 |
2.0.0 | 1.6.5 | 0.10.4 |
3.0.0 | 1.7.3 | 0.10.4 |
<dependency>
<groupId>net.jqwik</groupId>
<artifactId>jqwik-vavr</artifactId>
<version>LATEST</version>
</dependency>
repositories {
mavenCentral()
}
dependencies {
...
testImplementation("net.jqwik:jqwik-vavr:3.0.0")
}