Skip to content

Commit e8c401e

Browse files
bclozelsnicoll
authored andcommitted
Add more tests for default convention
1 parent 5ab3374 commit e8c401e

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

spring-ws-core/src/test/java/org/springframework/ws/transport/observation/DefaultSoapServerObservationConventionTests.java

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,26 @@ void namespace() {
9999
}
100100

101101
@Test
102-
void uri() throws Exception {
102+
void httpUri() throws Exception {
103103
when(this.connectionMock.getUri()).thenReturn(URI.create("https://localhost:443/services"));
104104
assertThat(this.convention.getHighCardinalityKeyValues(this.context))
105105
.contains(KeyValue.of("uri", "https://localhost:443/services"));
106106
}
107107

108+
@Test
109+
void mailUri() throws Exception {
110+
when(this.connectionMock.getUri()).thenReturn(URI.create("mailto:server@localhost?subject=SOAP%20Test"));
111+
assertThat(this.convention.getHighCardinalityKeyValues(this.context))
112+
.contains(KeyValue.of("uri", "mailto:server@localhost?subject=SOAP%20Test"));
113+
}
114+
115+
@Test
116+
void jmsUri() throws Exception {
117+
when(this.connectionMock.getUri()).thenReturn(URI.create("jms:SenderRequestQueue?deliveryMode=NON_PERSISTENT"));
118+
assertThat(this.convention.getHighCardinalityKeyValues(this.context))
119+
.contains(KeyValue.of("uri", "jms:SenderRequestQueue?deliveryMode=NON_PERSISTENT"));
120+
}
121+
108122
@Test
109123
void faultReason() {
110124
this.response.setFaultReason("Invalid country format");

0 commit comments

Comments
 (0)