|
|
|
@ -96,11 +96,21 @@ class JmsAccessorTests {
@@ -96,11 +96,21 @@ class JmsAccessorTests {
|
|
|
|
|
assertThat(uniqueValues).hasSize(4); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
void setSessionAcknowledgeMode() { |
|
|
|
|
assertThatIllegalArgumentException().isThrownBy(() -> accessor.setSessionAcknowledgeMode(999)); |
|
|
|
|
|
|
|
|
|
private static Stream<String> streamAcknowledgeModeConstants() { |
|
|
|
|
return Arrays.stream(Session.class.getFields()) |
|
|
|
|
.filter(ReflectionUtils::isPublicStaticFinal) |
|
|
|
|
.map(Field::getName); |
|
|
|
|
accessor.setSessionAcknowledgeMode(Session.AUTO_ACKNOWLEDGE); |
|
|
|
|
assertThat(accessor.getSessionAcknowledgeMode()).isEqualTo(Session.AUTO_ACKNOWLEDGE); |
|
|
|
|
|
|
|
|
|
accessor.setSessionAcknowledgeMode(Session.CLIENT_ACKNOWLEDGE); |
|
|
|
|
assertThat(accessor.getSessionAcknowledgeMode()).isEqualTo(Session.CLIENT_ACKNOWLEDGE); |
|
|
|
|
|
|
|
|
|
accessor.setSessionAcknowledgeMode(Session.DUPS_OK_ACKNOWLEDGE); |
|
|
|
|
assertThat(accessor.getSessionAcknowledgeMode()).isEqualTo(Session.DUPS_OK_ACKNOWLEDGE); |
|
|
|
|
|
|
|
|
|
accessor.setSessionAcknowledgeMode(Session.SESSION_TRANSACTED); |
|
|
|
|
assertThat(accessor.getSessionAcknowledgeMode()).isEqualTo(Session.SESSION_TRANSACTED); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
@ -110,4 +120,11 @@ class JmsAccessorTests {
@@ -110,4 +120,11 @@ class JmsAccessorTests {
|
|
|
|
|
assertThat(accessor.isClientAcknowledge(session)).isTrue(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static Stream<String> streamAcknowledgeModeConstants() { |
|
|
|
|
return Arrays.stream(Session.class.getFields()) |
|
|
|
|
.filter(ReflectionUtils::isPublicStaticFinal) |
|
|
|
|
.map(Field::getName); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|