-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.html
30 lines (25 loc) · 1.03 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
---
layout: default
---
<div class="home">
<p>
<h1> Welcome to <span style="font-weight: bold;">QuickTheories</span> - <a href="/about/#property_testing" style = "font-weight: bold;">property based testing</a> for Java 8. </h1>
<p>
If you were looking for QuickCheck for Java you just found it.
<p> QuickTheories allows you to property test your code in a repeatable manner and supports <span style="font-style: italic;">shrinking</span> to help find "simpler" values which may be easier to understand and work with.
<p>
<pre><code> @Test
public void someQuickTheoryExample() {
qt()
.withFixedSeed(40)
.withExamples(10000)
.forAll(integers().allPositive()
, integers().allPositive()
, lists().allListsOf(integers().from(-20).upTo(20)).ofSize(3)
, strings().basicLatinAlphabet().ofLengthBetween(0, 100))
.as((a, b, c, d) -> "Foo" + a.toString() + "Bar" + b + "Fish" + c)
.check(i -> i.length() < 40);
}
</code></pre>
<p>
</div>