Skip to content

Commit f835c33

Browse files
committed
Use JUnit 5 convention for test method visibility
1 parent 3f57342 commit f835c33

File tree

53 files changed

+226
-226
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+226
-226
lines changed

commons-digester3-core/src/test/java/org/apache/commons/digester3/AsyncReaderTestCase.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,15 @@ public void tearDown()
6464
}
6565

6666
@Test
67-
public void testParseFromClasspathURL()
67+
void testParseFromClasspathURL()
6868
throws Exception
6969
{
7070
final Future<Employee> future = digester.asyncParse( getClass().getResource( "Test9.xml" ) );
7171
verify( future );
7272
}
7373

7474
@Test
75-
public void testParseFromFile()
75+
void testParseFromFile()
7676
throws Exception
7777
{
7878
final Future<Employee> future = digester.asyncParse( new File( getProperty( "user.dir" ),
@@ -81,7 +81,7 @@ public void testParseFromFile()
8181
}
8282

8383
@Test
84-
public void testParseFromInputSource()
84+
void testParseFromInputSource()
8585
throws Exception
8686
{
8787
final Future<Employee> future =
@@ -90,15 +90,15 @@ public void testParseFromInputSource()
9090
}
9191

9292
@Test
93-
public void testParseFromInputStream()
93+
void testParseFromInputStream()
9494
throws Exception
9595
{
9696
final Future<Employee> future = digester.asyncParse( getClass().getResource( "Test9.xml" ).openStream() );
9797
verify( future );
9898
}
9999

100100
@Test
101-
public void testParseFromReader()
101+
void testParseFromReader()
102102
throws Exception
103103
{
104104
final Future<Employee> future =
@@ -107,7 +107,7 @@ public void testParseFromReader()
107107
}
108108

109109
@Test
110-
public void testParseFromUri()
110+
void testParseFromUri()
111111
throws Exception
112112
{
113113
final Future<Employee> future = digester.asyncParse( getClass().getResource( "Test9.xml" ).toExternalForm() );

commons-digester3-core/src/test/java/org/apache/commons/digester3/BeanPropertySetterRuleTestCase.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public class BeanPropertySetterRuleTestCase
5353
* Test that you can successfully automatically set properties.
5454
*/
5555
@Test
56-
public void testAutomaticallySetProperties()
56+
void testAutomaticallySetProperties()
5757
throws SAXException, IOException
5858
{
5959
final Digester digester = newLoader(new AbstractRulesModule()
@@ -84,7 +84,7 @@ protected void configure()
8484
* functioning correctly.
8585
*/
8686
@Test
87-
public void testDigesterBodyTextStack()
87+
void testDigesterBodyTextStack()
8888
throws SAXException, IOException
8989
{
9090
final List<Rule> callOrder = new ArrayList<>();
@@ -120,7 +120,7 @@ protected void configure()
120120
* properly enforced.
121121
*/
122122
@Test
123-
public void testDigesterRuleCallOrder()
123+
void testDigesterRuleCallOrder()
124124
throws SAXException, IOException
125125
{
126126

@@ -172,7 +172,7 @@ protected void configure()
172172
}
173173

174174
@Test
175-
public void testExtractPropertyNameFromAttribute() throws Exception
175+
void testExtractPropertyNameFromAttribute() throws Exception
176176
{
177177
final Employee expected = new Employee( "John", "Doe" );
178178

@@ -198,7 +198,7 @@ protected void configure()
198198
* Test that you can successfully set a given property
199199
*/
200200
@Test
201-
public void testSetGivenProperty()
201+
void testSetGivenProperty()
202202
throws SAXException, IOException
203203
{
204204
final Digester digester = newLoader(new AbstractRulesModule()
@@ -237,7 +237,7 @@ protected void configure()
237237
* Test that trying to set an unknown property throws an exception.
238238
*/
239239
@Test
240-
public void testSetUnknownProperty()
240+
void testSetUnknownProperty()
241241
{
242242
final Digester digester = newLoader(new AbstractRulesModule()
243243
{

commons-digester3-core/src/test/java/org/apache/commons/digester3/CallMethodRuleTestCase.java

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ protected InputStream getInputStream( final String name )
6464
* several rule syntaxes.
6565
*/
6666
@Test
67-
public void testBasic() throws Exception
67+
void testBasic() throws Exception
6868
{
6969
final Digester digester = newLoader( new AbstractRulesModule()
7070
{
@@ -97,7 +97,7 @@ protected void configure()
9797
* Test invoking an object which does not exist on the stack.
9898
*/
9999
@Test
100-
public void testCallInvalidTarget()
100+
void testCallInvalidTarget()
101101
{
102102

103103
final Digester digester = new Digester();
@@ -116,7 +116,7 @@ public void testCallInvalidTarget()
116116
* Test method calls with the CallMethodRule reading from the element body, with no CallParamMethod rules added.
117117
*/
118118
@Test
119-
public void testCallMethodOnly()
119+
void testCallMethodOnly()
120120
throws Exception
121121
{
122122
final Digester digester = newLoader( new AbstractRulesModule()
@@ -145,7 +145,7 @@ protected void configure()
145145
* Test invoking an object which is at top-1 on the stack, like SetNextRule does...
146146
*/
147147
@Test
148-
public void testCallNext()
148+
void testCallNext()
149149
throws Exception
150150
{
151151

@@ -176,7 +176,7 @@ public void testCallNext()
176176
* Test invoking an object which is at the root of the stack, like SetRoot does...
177177
*/
178178
@Test
179-
public void testCallRoot()
179+
void testCallRoot()
180180
throws Exception
181181
{
182182

@@ -204,7 +204,7 @@ public void testCallRoot()
204204
}
205205

206206
@Test
207-
public void testFromStack()
207+
void testFromStack()
208208
throws Exception
209209
{
210210

@@ -266,7 +266,7 @@ public void testFromStack()
266266
}
267267

268268
@Test
269-
public void testNestedBody()
269+
void testNestedBody()
270270
throws Exception
271271
{
272272

@@ -325,7 +325,7 @@ public void testNestedBody()
325325
* CallMethodRule triggered on.
326326
*/
327327
@Test
328-
public void testOrderNestedPartA()
328+
void testOrderNestedPartA()
329329
throws Exception
330330
{
331331
final Digester digester = newLoader( new AbstractRulesModule()
@@ -370,7 +370,7 @@ protected void configure()
370370
* on this call order so this test is present to ensure that no-one changes this behavior.
371371
*/
372372
@Test
373-
public void testOrderNestedPartB()
373+
void testOrderNestedPartB()
374374
throws Exception
375375
{
376376
final Digester digester = newLoader( new AbstractRulesModule()
@@ -401,7 +401,7 @@ protected void configure()
401401
* This tests the call methods params enhancement that provides for more complex stack-based calls.
402402
*/
403403
@Test
404-
public void testParamsFromStack() throws Exception
404+
void testParamsFromStack() throws Exception
405405
{
406406
final Digester digester = newLoader( new AbstractRulesModule()
407407
{
@@ -439,7 +439,7 @@ protected void configure()
439439

440440
/** Test for the PathCallParamRule */
441441
@Test
442-
public void testPathCallParam()
442+
void testPathCallParam()
443443
throws Exception
444444
{
445445
final String xml =
@@ -465,7 +465,7 @@ public void testPathCallParam()
465465
}
466466

467467
@Test
468-
public void testPrimitiveReading()
468+
void testPrimitiveReading()
469469
throws Exception
470470
{
471471
final StringReader reader =
@@ -518,7 +518,7 @@ public void testPrimitiveReading()
518518
}
519519

520520
@Test
521-
public void testProcessingHook()
521+
void testProcessingHook()
522522
throws Exception
523523
{
524524

@@ -568,7 +568,7 @@ protected void processMethodCallResult( final Object result )
568568
* float should all be acceptable as parameter types.
569569
*/
570570
@Test
571-
public void testSettingProperties() throws Exception
571+
void testSettingProperties() throws Exception
572572
{
573573
Digester digester = newLoader( new AbstractRulesModule()
574574
{
@@ -649,7 +649,7 @@ protected void configure()
649649
}
650650

651651
@Test
652-
public void testTwoCalls()
652+
void testTwoCalls()
653653
throws Exception
654654
{
655655

commons-digester3-core/src/test/java/org/apache/commons/digester3/DTDValidationTestCase.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public class DTDValidationTestCase
3434
{
3535

3636
@Test
37-
public void testDigesterDTDError()
37+
void testDigesterDTDError()
3838
{
3939
Digester digester = newLoader( new AbstractRulesModule() {
4040

@@ -76,7 +76,7 @@ public void warning( final SAXParseException e )
7676
}
7777

7878
@Test
79-
public void testDigesterLoaderFeatureDisabled()
79+
void testDigesterLoaderFeatureDisabled()
8080
throws Exception
8181
{
8282
newLoader( new AbstractRulesModule()
@@ -98,7 +98,7 @@ protected void configure()
9898
}
9999

100100
@Test
101-
public void testDigesterNoDTDValidation()
101+
void testDigesterNoDTDValidation()
102102
throws Exception
103103
{
104104
newLoader( new AbstractRulesModule()
@@ -117,7 +117,7 @@ protected void configure()
117117
}
118118

119119
@Test
120-
public void testDigesterValidation()
120+
void testDigesterValidation()
121121
throws Exception
122122
{
123123
newLoader( new AbstractRulesModule()

commons-digester3-core/src/test/java/org/apache/commons/digester3/Digester133TestCase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ protected void setPropertyOfMapBean( @SuppressWarnings( "rawtypes" ) final Map b
9292
}
9393

9494
@Test
95-
public void testDigester()
95+
void testDigester()
9696
throws IOException, SAXException
9797
{
9898
final PropertyUtilsBean propertyUtils = new MyPropertyUtilsBean();

commons-digester3-core/src/test/java/org/apache/commons/digester3/Digester153TestCase.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ private void successfulConstructor( final RulesModule rulesModule )
6262
}
6363

6464
@Test
65-
public void testBasicConstructor()
65+
void testBasicConstructor()
6666
throws Exception
6767
{
6868
final ObjectCreateRule createRule = new ObjectCreateRule( TestBean.class );
@@ -86,7 +86,7 @@ public void testBasicConstructor()
8686
}
8787

8888
@Test
89-
public void testBasicConstructorViaAnnotations()
89+
void testBasicConstructorViaAnnotations()
9090
throws Exception
9191
{
9292
successfulConstructor( new FromAnnotationsRuleModule()
@@ -102,7 +102,7 @@ protected void configureRules()
102102
}
103103

104104
@Test
105-
public void testBasicConstructorViaBinder()
105+
void testBasicConstructorViaBinder()
106106
throws Exception
107107
{
108108
successfulConstructor( new AbstractRulesModule()
@@ -123,7 +123,7 @@ protected void configure()
123123
}
124124

125125
@Test
126-
public void testBasicConstructorViaXML()
126+
void testBasicConstructorViaXML()
127127
throws Exception
128128
{
129129
successfulConstructor( new FromXmlRulesModule()
@@ -139,7 +139,7 @@ protected void loadRules()
139139
}
140140

141141
@Test
142-
public void testBasicConstructorWithValuesNotFound()
142+
void testBasicConstructorWithValuesNotFound()
143143
throws Exception
144144
{
145145
final ObjectCreateRule createRule = new ObjectCreateRule( TestBean.class );
@@ -157,7 +157,7 @@ public void testBasicConstructorWithValuesNotFound()
157157
}
158158

159159
@Test
160-
public void testConstructorWithAttributeAndElement()
160+
void testConstructorWithAttributeAndElement()
161161
throws Exception
162162
{
163163
final ObjectCreateRule createRule = new ObjectCreateRule( TestBean.class );
@@ -184,7 +184,7 @@ public void testConstructorWithAttributeAndElement()
184184
}
185185

186186
@Test
187-
public void testConstructorWithClassDefinedInAttribute()
187+
void testConstructorWithClassDefinedInAttribute()
188188
throws Exception
189189
{
190190
final ObjectCreateRule createRule = new ObjectCreateRule( null, "type" );

commons-digester3-core/src/test/java/org/apache/commons/digester3/Digester162TestCase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public final class Digester162TestCase
3030
{
3131

3232
@Test
33-
public void testAllowCreateObjectsWhichTypesAreSpecifiedInAttributeNameOnly()
33+
void testAllowCreateObjectsWhichTypesAreSpecifiedInAttributeNameOnly()
3434
throws Exception
3535
{
3636
final Digester digester = newLoader( new AbstractRulesModule()

commons-digester3-core/src/test/java/org/apache/commons/digester3/Digester171TestCase.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public class Digester171TestCase
3333
{
3434

3535
@Test
36-
public void testDefaultThrowingErrorHandler()
36+
void testDefaultThrowingErrorHandler()
3737
throws Exception
3838
{
3939
final ErrorHandler customErrorHandler = new DefaultThrowingErrorHandler();
@@ -55,7 +55,7 @@ protected void configure()
5555
}
5656

5757
@Test
58-
public void testNoErrorHandler()
58+
void testNoErrorHandler()
5959
throws Exception
6060
{
6161
newLoader( new AbstractRulesModule()

0 commit comments

Comments
 (0)