Skip to content

Commit db2f1d6

Browse files
committed
Polish JmsAccessorTests
This commit reduces the visibility of JmsAccessorTests and its test methods to package-private and removes unnecessary throws declarations.
1 parent 9b590a0 commit db2f1d6

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

spring-jms/src/test/java/org/springframework/jms/support/JmsAccessorTests.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,33 +31,33 @@
3131
* @author Chris Beams
3232
* @author Vedran Pavic
3333
*/
34-
public class JmsAccessorTests {
34+
class JmsAccessorTests {
3535

3636
@Test
37-
public void testChokesIfConnectionFactoryIsNotSupplied() throws Exception {
37+
void testChokesIfConnectionFactoryIsNotSupplied() {
3838
JmsAccessor accessor = new StubJmsAccessor();
3939
assertThatIllegalArgumentException().isThrownBy(
4040
accessor::afterPropertiesSet);
4141
}
4242

4343
@Test
44-
public void testSessionTransactedModeReallyDoesDefaultToFalse() throws Exception {
44+
void testSessionTransactedModeReallyDoesDefaultToFalse() {
4545
JmsAccessor accessor = new StubJmsAccessor();
4646
assertThat(accessor.isSessionTransacted()).as("The [sessionTransacted] property of JmsAccessor must default to " +
4747
"false. Change this test (and the attendant Javadoc) if you have " +
4848
"changed the default.").isFalse();
4949
}
5050

5151
@Test
52-
public void testAcknowledgeModeReallyDoesDefaultToAutoAcknowledge() throws Exception {
52+
void testAcknowledgeModeReallyDoesDefaultToAutoAcknowledge() {
5353
JmsAccessor accessor = new StubJmsAccessor();
5454
assertThat(accessor.getSessionAcknowledgeMode()).as("The [sessionAcknowledgeMode] property of JmsAccessor must default to " +
5555
"[Session.AUTO_ACKNOWLEDGE]. Change this test (and the attendant " +
5656
"Javadoc) if you have changed the default.").isEqualTo(Session.AUTO_ACKNOWLEDGE);
5757
}
5858

5959
@Test
60-
public void testSetAcknowledgeModeNameChokesIfBadAckModeIsSupplied() throws Exception {
60+
void testSetAcknowledgeModeNameChokesIfBadAckModeIsSupplied() {
6161
assertThatIllegalArgumentException().isThrownBy(() ->
6262
new StubJmsAccessor().setSessionAcknowledgeModeName("Tally ho chaps!"));
6363
}

0 commit comments

Comments
 (0)