Skip to content

Commit 374f0a7

Browse files
committed
Remove LongAdder from Java6 assertThat entry points
1 parent 01a1e21 commit 374f0a7

6 files changed

+19
-40
lines changed

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

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -125,18 +125,6 @@ public static <OBJECT> AtomicIntegerFieldUpdaterAssert<OBJECT> assertThat(Atomic
125125
return new AtomicIntegerFieldUpdaterAssert<>(actual);
126126
}
127127

128-
/**
129-
* Create assertion for {@link LongAdder}.
130-
*
131-
* @param actual the actual value.
132-
*
133-
* @return the created assertion object.
134-
* @since 3.16.0
135-
*/
136-
public static LongAdderAssert assertThat(LongAdder actual) {
137-
return new LongAdderAssert(actual);
138-
}
139-
140128
/**
141129
* Create assertion for {@link AtomicLong}.
142130
*

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

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -102,17 +102,6 @@ public static <OBJECT> AtomicIntegerFieldUpdaterAssert<OBJECT> then(AtomicIntege
102102
return new AtomicIntegerFieldUpdaterAssert<>(actual);
103103
}
104104

105-
/**
106-
* Create assertion for {@link LongAdder}.
107-
*
108-
* @param actual the actual value.
109-
* @return the created assertion object.
110-
* @since 3.16.0
111-
*/
112-
public static LongAdderAssert then(LongAdder actual) {
113-
return new LongAdderAssert(actual);
114-
}
115-
116105
/**
117106
* Create assertion for {@link AtomicLong}.
118107
*

src/test/java/org/assertj/core/api/Assertions_sync_assertThat_with_BDD_and_Soft_variants_Test.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@
2424
/**
2525
* @author Filip Hrisafov
2626
*/
27-
public class Assertions_sync_assertThat_with_BDD_and_Soft_variants_Test extends BaseAssertionsTest {
27+
class Assertions_sync_assertThat_with_BDD_and_Soft_variants_Test extends BaseAssertionsTest {
2828

2929
@Test
30-
public void standard_assertions_and_bdd_assertions_should_have_the_same_assertions_methods() {
30+
void standard_assertions_and_bdd_assertions_should_have_the_same_assertions_methods() {
3131
Method[] assertThatMethods = findMethodsWithName(Assertions.class, "assertThat");
3232
Method[] thenMethods = findMethodsWithName(BDDAssertions.class, "then");
3333

@@ -36,7 +36,7 @@ public void standard_assertions_and_bdd_assertions_should_have_the_same_assertio
3636
}
3737

3838
@Test
39-
public void standard_assertions_and_with_assertions_should_have_the_same_assertions_methods() {
39+
void standard_assertions_and_with_assertions_should_have_the_same_assertions_methods() {
4040
Method[] assertionsMethods = findMethodsWithName(Assertions.class, "assertThat");
4141
Method[] withAssertionsMethods = findMethodsWithName(WithAssertions.class, "assertThat");
4242

@@ -45,7 +45,7 @@ public void standard_assertions_and_with_assertions_should_have_the_same_asserti
4545
}
4646

4747
@Test
48-
public void standard_assertions_and_with_assertions_should_have_the_same_non_assertions_methods() {
48+
void standard_assertions_and_with_assertions_should_have_the_same_non_assertions_methods() {
4949

5050
Set<Method> nonAssertionsMethods = nonAssertionsMethodsOf(Assertions.class.getDeclaredMethods());
5151
Set<Method> nonWithAssertionsMethods = nonAssertionsMethodsOf(WithAssertions.class.getDeclaredMethods());
@@ -55,7 +55,7 @@ public void standard_assertions_and_with_assertions_should_have_the_same_non_ass
5555
}
5656

5757
@Test
58-
public void standard_assertions_and_soft_assertions_should_have_the_same_assertions_methods() {
58+
void standard_assertions_and_soft_assertions_should_have_the_same_assertions_methods() {
5959
// Until the SpecialIgnoredReturnTypes like AssertProvider, XXXNavigableXXXAssert are implemented for
6060
// the soft assertions we need to ignore them
6161
Method[] assertThatMethods = findMethodsWithName(Assertions.class, "assertThat", SPECIAL_IGNORED_RETURN_TYPES);
@@ -68,7 +68,7 @@ public void standard_assertions_and_soft_assertions_should_have_the_same_asserti
6868
}
6969

7070
@Test
71-
public void bdd_assertions_and_bdd_soft_assertions_should_have_the_same_assertions_methods() {
71+
void bdd_assertions_and_bdd_soft_assertions_should_have_the_same_assertions_methods() {
7272
// Until the SpecialIgnoredReturnTypes like AssertProvider, XXXNavigableXXXAssert are implemented for
7373
// the soft assertions we need to ignore them
7474
Method[] thenMethods = findMethodsWithName(BDDAssertions.class, "then", SPECIAL_IGNORED_RETURN_TYPES);

src/test/java/org/assertj/core/api/Assertions_sync_with_Assumptions_Test.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818

1919
import org.junit.jupiter.api.Test;
2020

21-
public class Assertions_sync_with_Assumptions_Test extends BaseAssertionsTest {
21+
class Assertions_sync_with_Assumptions_Test extends BaseAssertionsTest {
2222

2323
@Test
24-
public void standard_assertions_and_assumptions_should_have_the_same_assertions_methods() {
24+
void standard_assertions_and_assumptions_should_have_the_same_assertions_methods() {
2525
Method[] assertThatMethods = findMethodsWithName(Assertions.class, "assertThat", SPECIAL_IGNORED_RETURN_TYPES);
2626
Method[] assumeThatMethods = findMethodsWithName(Assumptions.class, "assumeThat");
2727

@@ -30,7 +30,7 @@ public void standard_assertions_and_assumptions_should_have_the_same_assertions_
3030
}
3131

3232
@Test
33-
public void standard_assumptions_and_with_assumptions_should_have_the_same_assertions_methods() {
33+
void standard_assumptions_and_with_assumptions_should_have_the_same_assertions_methods() {
3434
Method[] assumptionsMethods = findMethodsWithName(Assumptions.class, "assumeThat");
3535
Method[] withAssumptionsMethods = findMethodsWithName(WithAssumptions.class, "assumeThat");
3636

src/test/java/org/assertj/core/api/Assertions_sync_with_BDDAssumptions_Test.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@
1818

1919
import org.junit.jupiter.api.Test;
2020

21-
public class Assertions_sync_with_BDDAssumptions_Test extends BaseAssertionsTest {
21+
class Assertions_sync_with_BDDAssumptions_Test extends BaseAssertionsTest {
22+
2223
@Test
23-
public void standard_assertions_and_bdd_assumptions_should_have_the_same_assertions_methods() {
24+
void standard_assertions_and_bdd_assumptions_should_have_the_same_assertions_methods() {
2425
Method[] assertThatMethods = findMethodsWithName(Assertions.class, "assertThat", SPECIAL_IGNORED_RETURN_TYPES);
2526
Method[] givenMethods = findMethodsWithName(BDDAssumptions.class, "given");
2627

@@ -29,7 +30,7 @@ public void standard_assertions_and_bdd_assumptions_should_have_the_same_asserti
2930
}
3031

3132
@Test
32-
public void object_assertions_and_bdd_assumptions_should_have_the_same_assertions_methods() {
33+
void object_assertions_and_bdd_assumptions_should_have_the_same_assertions_methods() {
3334
Method[] assertThatMethods = findMethodsWithName(Assertions.class, "assertThatObject", SPECIAL_IGNORED_RETURN_TYPES);
3435
Method[] givenMethods = findMethodsWithName(BDDAssumptions.class, "givenObject");
3536

@@ -38,11 +39,12 @@ public void object_assertions_and_bdd_assumptions_should_have_the_same_assertion
3839
}
3940

4041
@Test
41-
public void code_assertions_and_bdd_assumptions_should_have_the_same_assertions_methods() {
42+
void code_assertions_and_bdd_assumptions_should_have_the_same_assertions_methods() {
4243
Method[] assertThatMethods = findMethodsWithName(Assertions.class, "assertThatCode", SPECIAL_IGNORED_RETURN_TYPES);
4344
Method[] givenMethods = findMethodsWithName(BDDAssumptions.class, "givenCode");
4445

4546
assertThat(givenMethods).usingElementComparator(IGNORING_DECLARING_CLASS_RETURN_TYPE_AND_METHOD_NAME)
4647
.contains(assertThatMethods);
4748
}
49+
4850
}

src/test/java/org/assertj/core/api/Java6Assertions_sync_assertThat_with_BDD_and_Soft_variants_Test.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@
2222
* @author Filip Hrisafov
2323
*/
2424
@SuppressWarnings("deprecation")
25-
public class Java6Assertions_sync_assertThat_with_BDD_and_Soft_variants_Test extends BaseAssertionsTest {
25+
class Java6Assertions_sync_assertThat_with_BDD_and_Soft_variants_Test extends BaseAssertionsTest {
2626

2727
@Test
28-
public void standard_assertions_and_bdd_assertions_should_have_the_same_assertions_methods() {
28+
void standard_assertions_and_bdd_assertions_should_have_the_same_assertions_methods() {
2929
Method[] assertThatMethods = findMethodsWithName(Java6Assertions.class, "assertThat");
3030
Method[] thenMethods = findMethodsWithName(Java6BDDAssertions.class, "then");
3131

@@ -34,7 +34,7 @@ public void standard_assertions_and_bdd_assertions_should_have_the_same_assertio
3434
}
3535

3636
@Test
37-
public void standard_assertions_and_soft_assertions_should_have_the_same_assertions_methods() {
37+
void standard_assertions_and_soft_assertions_should_have_the_same_assertions_methods() {
3838
// Until the SpecialIgnoredReturnTypes like AssertProvider, XXXNavigableXXXAssert are implemented for
3939
// the soft assertions we need to ignore them
4040
Method[] assertThatMethods = findMethodsWithName(Java6Assertions.class, "assertThat", SPECIAL_IGNORED_RETURN_TYPES);
@@ -47,7 +47,7 @@ public void standard_assertions_and_soft_assertions_should_have_the_same_asserti
4747
}
4848

4949
@Test
50-
public void bdd_assertions_and_bdd_soft_assertions_should_have_the_same_assertions_methods() {
50+
void bdd_assertions_and_bdd_soft_assertions_should_have_the_same_assertions_methods() {
5151
// Until the SpecialIgnoredReturnTypes like AssertProvider, XXXNavigableXXXAssert are implemented for
5252
// the soft assertions we need to ignore them
5353
Method[] thenMethods = findMethodsWithName(Java6BDDAssertions.class, "then", SPECIAL_IGNORED_RETURN_TYPES);

0 commit comments

Comments
 (0)