Skip to content

Commit 42d8d53

Browse files
committed
Bump junit:junit from 4.11 to 4.13.2
1 parent 2869b2c commit 42d8d53

File tree

6 files changed

+47
-51
lines changed

6 files changed

+47
-51
lines changed

pom.xml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
<maven.compiler.source>1.8</maven.compiler.source>
2525
<maven.compiler.target>1.8</maven.compiler.target>
2626
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
27+
<!-- Needed to properly bring in the Maven dependencies, see http://maven.apache.org/surefire/maven-surefire-plugin/examples/class-loading.html) -->
28+
<surefire.useSystemClassLoader>false</surefire.useSystemClassLoader>
2729
</properties>
2830

2931
<dependencyManagement>
@@ -36,7 +38,7 @@
3638
<dependency>
3739
<groupId>junit</groupId>
3840
<artifactId>junit</artifactId>
39-
<version>4.11</version>
41+
<version>4.13.2</version>
4042
</dependency>
4143
</dependencies>
4244
</dependencyManagement>
@@ -137,7 +139,6 @@
137139
</archive>
138140
</configuration>
139141
</plugin>
140-
<!-- generate jacoco report -->
141142
<plugin>
142143
<groupId>org.jacoco</groupId>
143144
<artifactId>jacoco-maven-plugin</artifactId>
@@ -148,15 +149,6 @@
148149
<outputDirectory>target/site/jacoco</outputDirectory>
149150
</configuration>
150151
</plugin>
151-
<!-- to get jacoco report we need to set argLine in surefire, without this snippet the jacoco argLine is lost -->
152-
<plugin>
153-
<artifactId>maven-surefire-plugin</artifactId>
154-
<configuration>
155-
<argLine>${argLine}</argLine>
156-
<!-- Needed because otherwise the classloader does not properly bring in the dependencies from maven. Source: http://maven.apache.org/surefire/maven-surefire-plugin/examples/class-loading.html -->
157-
<useSystemClassLoader>false</useSystemClassLoader>
158-
</configuration>
159-
</plugin>
160152
</plugins>
161153
</build>
162154
</project>

src/test/java/org/assertj/assertions/generator/AssertionGeneratorTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@
4949
import static org.assertj.core.api.Assertions.*;
5050

5151
@RunWith(Theories.class)
52-
public class AssertionGeneratorTest implements NestedClassesTest, BeanWithExceptionsTest {
52+
public class AssertionGeneratorTest extends BeanWithExceptionsTest {
53+
5354
private static final String LINE_SEPARATOR = System.lineSeparator();
5455
private static final Logger logger = LoggerFactory.getLogger(AssertionGeneratorTest.class);
5556
private ClassToClassDescriptionConverter converter;

src/test/java/org/assertj/assertions/generator/BeanWithExceptionsTest.java

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -25,37 +25,39 @@
2525
/**
2626
* This interface contains a set of constants for testing generation from {@link org.assertj.assertions.generator.data.BeanWithOneException} class.
2727
*/
28-
public interface BeanWithExceptionsTest {
29-
List<TypeToken<? extends Throwable>> ONE_EXCEPTION =
28+
public abstract class BeanWithExceptionsTest extends NestedClassesTest {
29+
30+
private static final List<TypeToken<? extends Throwable>> ONE_EXCEPTION =
3031
ImmutableList.<TypeToken<? extends Throwable>>of(TypeToken.of(IOException.class));
31-
List<TypeToken<? extends Throwable>> TWO_EXCEPTIONS =
32-
ImmutableList.<TypeToken<? extends Throwable>>of(TypeToken.of(IOException.class),
33-
TypeToken.of(SQLException.class));
32+
33+
private static final List<TypeToken<? extends Throwable>> TWO_EXCEPTIONS =
34+
ImmutableList.<TypeToken<? extends Throwable>>of(TypeToken.of(IOException.class), TypeToken.of(SQLException.class));
35+
3436
@DataPoint
35-
TypeToken<BeanWithOneException> BEAN_WITH_ONE_EXCEPTION = TypeToken.of(BeanWithOneException.class);
37+
public static TypeToken<BeanWithOneException> BEAN_WITH_ONE_EXCEPTION = TypeToken.of(BeanWithOneException.class);
3638

3739
@DataPoint
38-
TypeToken<BeanWithTwoExceptions> BEAN_WITH_TWO_EXCEPTIONS = TypeToken.of(BeanWithTwoExceptions.class);
40+
public static TypeToken<BeanWithTwoExceptions> BEAN_WITH_TWO_EXCEPTIONS = TypeToken.of(BeanWithTwoExceptions.class);
3941

4042
@DataPoint
41-
GetterWithException STRING_1_EXCEPTION = new GetterWithException(BEAN_WITH_ONE_EXCEPTION, "stringPropertyThrowsException", ONE_EXCEPTION, false);
43+
public static GetterWithException STRING_1_EXCEPTION = new GetterWithException(BEAN_WITH_ONE_EXCEPTION, "stringPropertyThrowsException", ONE_EXCEPTION, false);
4244
@DataPoint
43-
GetterWithException STRING_2_EXCEPTIONS = new GetterWithException(BEAN_WITH_TWO_EXCEPTIONS, "stringPropertyThrowsException", TWO_EXCEPTIONS, false);
45+
public static GetterWithException STRING_2_EXCEPTIONS = new GetterWithException(BEAN_WITH_TWO_EXCEPTIONS, "stringPropertyThrowsException", TWO_EXCEPTIONS, false);
4446
@DataPoint
45-
GetterWithException BOOLEAN_1_EXCEPTION = new GetterWithException(BEAN_WITH_ONE_EXCEPTION, "booleanPropertyThrowsException", ONE_EXCEPTION, true);
47+
public static GetterWithException BOOLEAN_1_EXCEPTION = new GetterWithException(BEAN_WITH_ONE_EXCEPTION, "booleanPropertyThrowsException", ONE_EXCEPTION, true);
4648
@DataPoint
47-
GetterWithException BOOLEAN_2_EXCEPTIONS = new GetterWithException(BEAN_WITH_TWO_EXCEPTIONS, "booleanPropertyThrowsException", TWO_EXCEPTIONS, true);
49+
public static GetterWithException BOOLEAN_2_EXCEPTIONS = new GetterWithException(BEAN_WITH_TWO_EXCEPTIONS, "booleanPropertyThrowsException", TWO_EXCEPTIONS, true);
4850
@DataPoint
49-
GetterWithException ARRAY_1_EXCEPTION = new GetterWithException(BEAN_WITH_ONE_EXCEPTION, "arrayPropertyThrowsException", ONE_EXCEPTION, false);
51+
public static GetterWithException ARRAY_1_EXCEPTION = new GetterWithException(BEAN_WITH_ONE_EXCEPTION, "arrayPropertyThrowsException", ONE_EXCEPTION, false);
5052
@DataPoint
51-
GetterWithException ARRAY_2_EXCEPTIONS = new GetterWithException(BEAN_WITH_TWO_EXCEPTIONS, "arrayPropertyThrowsException", TWO_EXCEPTIONS, false);
53+
public static GetterWithException ARRAY_2_EXCEPTIONS = new GetterWithException(BEAN_WITH_TWO_EXCEPTIONS, "arrayPropertyThrowsException", TWO_EXCEPTIONS, false);
5254
@DataPoint
53-
GetterWithException ITERABLE_1_EXCEPTION = new GetterWithException(BEAN_WITH_ONE_EXCEPTION, "iterablePropertyThrowsException", ONE_EXCEPTION, false);
55+
public static GetterWithException ITERABLE_1_EXCEPTION = new GetterWithException(BEAN_WITH_ONE_EXCEPTION, "iterablePropertyThrowsException", ONE_EXCEPTION, false);
5456
@DataPoint
55-
GetterWithException ITERABLE_2_EXCEPTIONS = new GetterWithException(BEAN_WITH_TWO_EXCEPTIONS, "iterablePropertyThrowsException", TWO_EXCEPTIONS, false);
57+
public static GetterWithException ITERABLE_2_EXCEPTIONS = new GetterWithException(BEAN_WITH_TWO_EXCEPTIONS, "iterablePropertyThrowsException", TWO_EXCEPTIONS, false);
5658

5759

58-
class GetterWithException implements Comparable<GetterWithException> {
60+
public static class GetterWithException implements Comparable<GetterWithException> {
5961
private final TypeToken<?> beanClass;
6062
private final String propertyName;
6163
private final List<TypeToken<? extends Throwable>> exceptions;

src/test/java/org/assertj/assertions/generator/NestedClassesTest.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,49 +18,49 @@
1818
/**
1919
* This class contains a set of constants for nested classes.
2020
*/
21-
public interface NestedClassesTest {
21+
public abstract class NestedClassesTest {
2222
@DataPoint
23-
NestedClass SNC = new NestedClass(OuterClass.StaticNestedPerson.class,
23+
public static NestedClass SNC = new NestedClass(OuterClass.StaticNestedPerson.class,
2424
"OuterClass.StaticNestedPerson",
2525
"OuterClassStaticNestedPersonAssert",
2626
"org.assertj.assertions.generator.data.OuterClass",
2727
"OuterClassStaticNestedPersonAssert.java",
2828
"AbstractOuterClassStaticNestedPersonAssert",
2929
"AbstractOuterClassStaticNestedPersonAssert.java");
3030
@DataPoint
31-
NestedClass SNC_SNC = new NestedClass(OuterClass.StaticNestedPerson.SNP_StaticNestedPerson.class,
31+
public static NestedClass SNC_SNC = new NestedClass(OuterClass.StaticNestedPerson.SNP_StaticNestedPerson.class,
3232
"OuterClass.StaticNestedPerson.SNP_StaticNestedPerson",
3333
"OuterClassStaticNestedPersonSNP_StaticNestedPersonAssert",
3434
"org.assertj.assertions.generator.data.OuterClass",
3535
"OuterClassStaticNestedPersonSNP_StaticNestedPersonAssert.java",
3636
"AbstractOuterClassStaticNestedPersonSNP_StaticNestedPersonAssert",
3737
"AbstractOuterClassStaticNestedPersonSNP_StaticNestedPersonAssert.java");
3838
@DataPoint
39-
NestedClass SNC_IC = new NestedClass(OuterClass.StaticNestedPerson.SNP_InnerPerson.class,
39+
public static NestedClass SNC_IC = new NestedClass(OuterClass.StaticNestedPerson.SNP_InnerPerson.class,
4040
"OuterClass.StaticNestedPerson.SNP_InnerPerson",
4141
"OuterClassStaticNestedPersonSNP_InnerPersonAssert",
4242
"org.assertj.assertions.generator.data.OuterClass",
4343
"OuterClassStaticNestedPersonSNP_InnerPersonAssert.java",
4444
"AbstractOuterClassStaticNestedPersonSNP_InnerPersonAssert",
4545
"AbstractOuterClassStaticNestedPersonSNP_InnerPersonAssert.java");
4646
@DataPoint
47-
NestedClass IC = new NestedClass(OuterClass.InnerPerson.class,
47+
public static NestedClass IC = new NestedClass(OuterClass.InnerPerson.class,
4848
"OuterClass.InnerPerson",
4949
"OuterClassInnerPersonAssert",
5050
"org.assertj.assertions.generator.data.OuterClass",
5151
"OuterClassInnerPersonAssert.java",
5252
"AbstractOuterClassInnerPersonAssert",
5353
"AbstractOuterClassInnerPersonAssert.java");
5454
@DataPoint
55-
NestedClass IC_IC = new NestedClass(OuterClass.InnerPerson.IP_InnerPerson.class,
55+
public static NestedClass IC_IC = new NestedClass(OuterClass.InnerPerson.IP_InnerPerson.class,
5656
"OuterClass.InnerPerson.IP_InnerPerson",
5757
"OuterClassInnerPersonIP_InnerPersonAssert",
5858
"org.assertj.assertions.generator.data.OuterClass",
5959
"OuterClassInnerPersonIP_InnerPersonAssert.java",
6060
"AbstractOuterClassInnerPersonIP_InnerPersonAssert",
6161
"AbstractOuterClassInnerPersonIP_InnerPersonAssert.java");
6262

63-
class NestedClass {
63+
public static class NestedClass {
6464
public final Class<?> nestedClass;
6565
public final String assertClassName;
6666
public final String assertClassFilename;

src/test/java/org/assertj/assertions/generator/description/converter/ClassToClassDescriptionConverterTest.java

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@
4141
import static org.assertj.core.api.Assertions.assertThat;
4242

4343
@RunWith(Theories.class)
44-
public class ClassToClassDescriptionConverterTest implements NestedClassesTest, BeanWithExceptionsTest {
44+
public class ClassToClassDescriptionConverterTest extends BeanWithExceptionsTest {
45+
4546
private static ClassToClassDescriptionConverter converter;
4647

4748
@BeforeClass
@@ -50,7 +51,7 @@ public static void beforeAllTests() {
5051
}
5152

5253
@Test
53-
public void should_build_player_class_description() throws Exception {
54+
public void should_build_player_class_description() {
5455
// Given
5556
Class<?> clazz = Player.class;
5657
// When
@@ -71,7 +72,7 @@ public void should_build_player_class_description() throws Exception {
7172
}
7273

7374
@Test
74-
public void should_build_movie_class_description() throws Exception {
75+
public void should_build_movie_class_description() {
7576
// Given
7677
Class<?> clazz = Movie.class;
7778
// When
@@ -95,7 +96,7 @@ public void should_build_movie_class_description() throws Exception {
9596
}
9697

9798
@Test
98-
public void should_build_comparable_class_description() throws Exception {
99+
public void should_build_comparable_class_description() {
99100
// Given
100101
Class<?> clazz = Name.class;
101102
// When
@@ -106,7 +107,7 @@ public void should_build_comparable_class_description() throws Exception {
106107
}
107108

108109
@Test
109-
public void should_build_WithPrivateFields_class_description() throws Exception {
110+
public void should_build_WithPrivateFields_class_description() {
110111
ClassDescription classDescription = converter.convertToClassDescription(WithPrivateFields.class);
111112
assertThat(classDescription.getClassNameWithOuterClass()).isEqualTo("WithPrivateFields");
112113
assertThat(classDescription.getPackageName()).isEqualTo("org.assertj.assertions.generator.data");
@@ -118,7 +119,7 @@ public void should_build_WithPrivateFields_class_description() throws Exception
118119
}
119120

120121
@Theory
121-
public void should_build_nested_class_description(NestedClass nestedClass) throws Exception {
122+
public void should_build_nested_class_description(NestedClass nestedClass) {
122123
// Given
123124
Class<?> clazz = nestedClass.nestedClass;
124125
// When
@@ -135,7 +136,7 @@ public void should_build_nested_class_description(NestedClass nestedClass) throw
135136
}
136137

137138
@Theory
138-
public void should_build_getter_with_exception_description(GetterWithException getter) throws Exception {
139+
public void should_build_getter_with_exception_description(GetterWithException getter) {
139140
// Given
140141
TypeToken<?> type = getter.getBeanClass();
141142
Class<?> clazz = type.getRawType();
@@ -163,7 +164,7 @@ public List<int[]> getScores() {
163164
}
164165

165166
@Test
166-
public void should_build_class_description_for_iterable_of_primitive_type_array() throws Exception {
167+
public void should_build_class_description_for_iterable_of_primitive_type_array() {
167168
// Given
168169
Class<?> clazz = WithPrimitiveArrayCollection.class;
169170
// When
@@ -192,14 +193,14 @@ public int[][] getScores() {
192193
}
193194

194195
@Test(expected = IllegalArgumentException.class)
195-
public void should_fail_to_build_class_description_for_local_class() throws Exception {
196+
public void should_fail_to_build_class_description_for_local_class() {
196197
class Local {
197198
}
198199
converter.convertToClassDescription(Local.class);
199200
}
200201

201202
@Test
202-
public void should_build_class_description_for_array_of_primitive_type_array() throws Exception {
203+
public void should_build_class_description_for_array_of_primitive_type_array() {
203204
// When
204205
ClassDescription classDescription = converter.convertToClassDescription(WithPrimitiveArrayArrayCollection.class);
205206
// Then
@@ -211,7 +212,7 @@ public void should_build_class_description_for_array_of_primitive_type_array() t
211212
}
212213

213214
@Test
214-
public void should_build_class_description_for_enum_type() throws Exception {
215+
public void should_build_class_description_for_enum_type() {
215216
// When
216217
ClassDescription classDescription = converter.convertToClassDescription(TreeEnum.class);
217218
// Then
@@ -235,7 +236,7 @@ public List<Player[]> getPlayers() {
235236
}
236237

237238
@Test
238-
public void should_build_class_description_for_iterable_of_Object_type() throws Exception {
239+
public void should_build_class_description_for_iterable_of_Object_type() {
239240
// Given
240241
Class<?> clazz = WithIterableObjectType.class;
241242
// When
@@ -254,7 +255,7 @@ public void should_build_class_description_for_iterable_of_Object_type() throws
254255
}
255256

256257
@Test
257-
public void should_build_class_description_for_interface() throws Exception {
258+
public void should_build_class_description_for_interface() {
258259
// Given an interface
259260
Class<?> clazz = PlayerAgent.class;
260261
// When
@@ -271,7 +272,7 @@ public void should_build_class_description_for_interface() throws Exception {
271272
}
272273

273274
@Test
274-
public void should_build_fellowshipOfTheRing_class_description() throws Exception {
275+
public void should_build_fellowshipOfTheRing_class_description() {
275276
// Given
276277
Class<?> clazz = FellowshipOfTheRing.class;
277278
// When
@@ -291,7 +292,7 @@ public void should_handle_toString() {
291292
}
292293

293294
@Test
294-
public void should_build_class_description_for_class_with_public_fields() throws Exception {
295+
public void should_build_class_description_for_class_with_public_fields() {
295296
// Given
296297
Class<?> clazz = Team.class;
297298
// When

src/test/java/org/assertj/assertions/generator/util/ClassUtilTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
import com.google.common.reflect.TypeToken;
7979

8080
@RunWith(Theories.class)
81-
public class ClassUtilTest implements NestedClassesTest {
81+
public class ClassUtilTest extends NestedClassesTest {
8282

8383
private static final Class<?>[] NO_PARAMS = new Class[0];
8484

0 commit comments

Comments
 (0)