Skip to content

Commit

Permalink
Polish JmsAccessorTests
Browse files Browse the repository at this point in the history
  • Loading branch information
vpavic committed Jun 8, 2023
1 parent 37f8ff6 commit 7fb27d6
Showing 1 changed file with 5 additions and 5 deletions.
Expand Up @@ -31,33 +31,33 @@
* @author Chris Beams
* @author Vedran Pavic
*/
public class JmsAccessorTests {
class JmsAccessorTests {

@Test
public void testChokesIfConnectionFactoryIsNotSupplied() throws Exception {
void testChokesIfConnectionFactoryIsNotSupplied() {
JmsAccessor accessor = new StubJmsAccessor();
assertThatIllegalArgumentException().isThrownBy(
accessor::afterPropertiesSet);
}

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

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

@Test
public void testSetAcknowledgeModeNameChokesIfBadAckModeIsSupplied() throws Exception {
void testSetAcknowledgeModeNameChokesIfBadAckModeIsSupplied() {
assertThatIllegalArgumentException().isThrownBy(() ->
new StubJmsAccessor().setSessionAcknowledgeModeName("Tally ho chaps!"));
}
Expand Down

0 comments on commit 7fb27d6

Please sign in to comment.