Skip to content

Commit 97cfa5f

Browse files
committed
Minor renaming
1 parent 6c2a262 commit 97cfa5f

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed

src/main/java/org/assertj/core/api/AbstractLongAdderAssert.java

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public AbstractLongAdderAssert(LongAdder longAdder, Class<?> selfType) {
4646
}
4747

4848
/**
49-
* Verifies that the actual sum has the given value.
49+
* Verifies that the actual sum is the given value.
5050
* <p>
5151
* Example:
5252
* <pre><code class='java'> // assertion will pass
@@ -57,17 +57,15 @@ public AbstractLongAdderAssert(LongAdder longAdder, Class<?> selfType) {
5757
* // assertion will fail
5858
* assertThat(actual).hasValue(0);</code></pre>
5959
*
60-
* @param expectedValue the value not expected .
61-
*
60+
* @param expected the expected value.
6261
* @return {@code this} assertion object.
63-
*
6462
* @throws AssertionError if the actual adder is {@code null}.
6563
*/
66-
public SELF hasValue(long expectedValue) {
64+
public SELF hasValue(long expected) {
6765
isNotNull();
6866
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));
7169
}
7270
return myself;
7371
}
@@ -84,18 +82,16 @@ public SELF hasValue(long expectedValue) {
8482
* // assertion will fail
8583
* assertThat(actual).doesNotHaveValue(42);</code></pre>
8684
*
87-
* @param expectedValue the value not expected .
88-
*
85+
* @param unexpected the unexpected value.
8986
* @return {@code this} assertion object.
90-
*
9187
* @throws AssertionError if the actual adder is {@code null}.
9288
* @throws AssertionError if the actual sum is not the given value.
9389
*/
94-
public SELF doesNotHaveValue(long expectedValue) {
90+
public SELF doesNotHaveValue(long unexpected) {
9591
isNotNull();
9692
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));
9995
}
10096
return myself;
10197
}

0 commit comments

Comments
 (0)