9
9
10
10
11
11
/**
12
- * Entry point for asynchronous assertions.
12
+ * Entry point for building asynchronous assertions.
13
13
*/
14
14
@ NoArgsConstructor (access = AccessLevel .PRIVATE )
15
15
public final class AsyncAssertions
16
16
{
17
17
/**
18
- * Returns evaluator of asynchronous assertions with given timeout.
19
- * See {@link AsyncAssert} for more details.
20
- *
21
- * <pre>< code class='java'>
18
+ * Builds asynchronous assertion with given timeout.
19
+ * <p>
20
+ * Example usage:
21
+ * <pre>{@ code
22
22
* awaitAtMost(Duration.ofSeconds(5)).untilAssertions(async -> {
23
23
* async.assertThat(getValue()).isEqualTo(expected);
24
24
* });
25
- * </code></pre>
25
+ * }</pre>
26
+ * See {@link AsyncAssert} for more details.
26
27
*
27
28
* @param timeout timeout for the assertions
28
29
* @return {@link AsyncAssert}
@@ -33,16 +34,17 @@ public static AsyncAssert awaitAtMost(@NonNull final Duration timeout)
33
34
}
34
35
35
36
/**
36
- * Returns evaluator of asynchronous assertions with given timeout.
37
- * See {@link AsyncAssert} for more details.
38
- *
39
- * <pre>< code class='java'>
37
+ * Builds asynchronous assertion with given timeout value and time unit .
38
+ * <p>
39
+ * Example usage:
40
+ * <pre>{@ code
40
41
* awaitAtMost(5, SECONDS).untilAssertions(async -> {
41
42
* async.assertThat(getValue()).isEqualTo(expected);
42
43
* });
43
- * </code></pre>
44
+ * }</pre>
45
+ * See {@link AsyncAssert} for more details.
44
46
*
45
- * @param timeout timeout value for the assertions
47
+ * @param timeout timeout value for the assertion
46
48
* @param timeUnit timeout unit
47
49
* @return {@link AsyncAssert}
48
50
*/
@@ -52,14 +54,15 @@ public static AsyncAssert awaitAtMost(final long timeout, @NonNull final TimeUni
52
54
}
53
55
54
56
/**
55
- * Returns evaluator of asynchronous assertions with 1 second timeout.
56
- * See {@link AsyncAssert} for more details.
57
- *
58
- * <pre>< code class='java'>
57
+ * Builds asynchronous assertion with 1 second timeout.
58
+ * <p>
59
+ * Example usage:
60
+ * <pre>{@ code
59
61
* awaitAtMostOneSecond().untilAssertions(async -> {
60
62
* async.assertThat(getValue()).isEqualTo(expected);
61
63
* });
62
- * </code></pre>
64
+ * }</pre>
65
+ * See {@link AsyncAssert} for more details.
63
66
*
64
67
* @return {@link AsyncAssert}
65
68
*/
@@ -69,14 +72,15 @@ public static AsyncAssert awaitAtMostOneSecond()
69
72
}
70
73
71
74
/**
72
- * Returns evaluator of asynchronous assertions with 2 seconds timeout.
73
- * See {@link AsyncAssert} for more details.
74
- *
75
- * <pre>< code class='java'>
75
+ * Builds asynchronous assertion with 2 seconds timeout.
76
+ * <p>
77
+ * Example usage:
78
+ * <pre>{@ code
76
79
* awaitAtMostTwoSeconds().untilAssertions(async -> {
77
80
* async.assertThat(getValue()).isEqualTo(expected);
78
81
* });
79
- * </code></pre>
82
+ * }</pre>
83
+ * See {@link AsyncAssert} for more details.
80
84
*
81
85
* @return {@link AsyncAssert}
82
86
*/
@@ -86,14 +90,15 @@ public static AsyncAssert awaitAtMostTwoSeconds()
86
90
}
87
91
88
92
/**
89
- * Returns evaluator of asynchronous assertions with 5 seconds timeout.
90
- * See {@link AsyncAssert} for more details.
91
- *
92
- * <pre>< code class='java'>
93
+ * Builds asynchronous assertion with 5 seconds timeout.
94
+ * <p>
95
+ * Example usage:
96
+ * <pre>{@ code
93
97
* awaitAtMostFiveSeconds().untilAssertions(async -> {
94
98
* async.assertThat(getValue()).isEqualTo(expected);
95
99
* });
96
- * </code></pre>
100
+ * }</pre>
101
+ * See {@link AsyncAssert} for more details.
97
102
*
98
103
* @return {@link AsyncAssert}
99
104
*/
@@ -103,14 +108,15 @@ public static AsyncAssert awaitAtMostFiveSeconds()
103
108
}
104
109
105
110
/**
106
- * Returns evaluator of asynchronous assertions with 15 seconds timeout.
107
- * See {@link AsyncAssert} for more details.
108
- *
109
- * <pre>< code class='java'>
111
+ * Builds asynchronous assertion with 15 seconds timeout.
112
+ * <p>
113
+ * Example usage:
114
+ * <pre>{@ code
110
115
* awaitAtMostFifteenSeconds().untilAssertions(async -> {
111
116
* async.assertThat(getValue()).isEqualTo(expected);
112
117
* });
113
- * </code></pre>
118
+ * }</pre>
119
+ * See {@link AsyncAssert} for more details.
114
120
*
115
121
* @return {@link AsyncAssert}
116
122
*/
@@ -120,14 +126,15 @@ public static AsyncAssert awaitAtMostFifteenSeconds()
120
126
}
121
127
122
128
/**
123
- * Returns evaluator of asynchronous assertions with 30 seconds timeout.
124
- * See {@link AsyncAssert} for more details.
125
- *
126
- * <pre>< code class='java'>
129
+ * Builds asynchronous assertion with 30 seconds timeout.
130
+ * <p>
131
+ * Example usage:
132
+ * <pre>{@ code
127
133
* awaitAtMostThirtySeconds().untilAssertions(async -> {
128
134
* async.assertThat(getValue()).isEqualTo(expected);
129
135
* });
130
- * </code></pre>
136
+ * }</pre>
137
+ * See {@link AsyncAssert} for more details.
131
138
*
132
139
* @return {@link AsyncAssert}
133
140
*/
0 commit comments