@@ -46,7 +46,7 @@ public AbstractLongAdderAssert(LongAdder longAdder, Class<?> selfType) {
46
46
}
47
47
48
48
/**
49
- * Verifies that the actual sum has the given value.
49
+ * Verifies that the actual sum is the given value.
50
50
* <p>
51
51
* Example:
52
52
* <pre><code class='java'> // assertion will pass
@@ -57,17 +57,15 @@ public AbstractLongAdderAssert(LongAdder longAdder, Class<?> selfType) {
57
57
* // assertion will fail
58
58
* assertThat(actual).hasValue(0);</code></pre>
59
59
*
60
- * @param expectedValue the value not expected .
61
- *
60
+ * @param expected the expected value.
62
61
* @return {@code this} assertion object.
63
- *
64
62
* @throws AssertionError if the actual adder is {@code null}.
65
63
*/
66
- public SELF hasValue (long expectedValue ) {
64
+ public SELF hasValue (long expected ) {
67
65
isNotNull ();
68
66
long actualValue = actual .sum ();
69
- if (!objects .getComparisonStrategy ().areEqual (actualValue , expectedValue )) {
70
- throwAssertionError (shouldHaveValue (actual , expectedValue ));
67
+ if (!objects .getComparisonStrategy ().areEqual (actualValue , expected )) {
68
+ throwAssertionError (shouldHaveValue (actual , expected ));
71
69
}
72
70
return myself ;
73
71
}
@@ -84,18 +82,16 @@ public SELF hasValue(long expectedValue) {
84
82
* // assertion will fail
85
83
* assertThat(actual).doesNotHaveValue(42);</code></pre>
86
84
*
87
- * @param expectedValue the value not expected .
88
- *
85
+ * @param unexpected the unexpected value.
89
86
* @return {@code this} assertion object.
90
- *
91
87
* @throws AssertionError if the actual adder is {@code null}.
92
88
* @throws AssertionError if the actual sum is not the given value.
93
89
*/
94
- public SELF doesNotHaveValue (long expectedValue ) {
90
+ public SELF doesNotHaveValue (long unexpected ) {
95
91
isNotNull ();
96
92
long actualValue = actual .sum ();
97
- if (objects .getComparisonStrategy ().areEqual (actualValue , expectedValue )) {
98
- throwAssertionError (shouldNotContainValue (actual , expectedValue ));
93
+ if (objects .getComparisonStrategy ().areEqual (actualValue , unexpected )) {
94
+ throwAssertionError (shouldNotContainValue (actual , unexpected ));
99
95
}
100
96
return myself ;
101
97
}
0 commit comments