SEC-2819 SimpDestinationMessageMatcher(String pattern, SimpMessageType
type) never passes type param to this() constructor
This commit is contained in:
@@ -15,14 +15,14 @@
|
||||
*/
|
||||
package org.springframework.security.messaging.util.matcher;
|
||||
|
||||
import static org.fest.assertions.Assertions.assertThat;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.springframework.messaging.simp.SimpMessageHeaderAccessor;
|
||||
import org.springframework.messaging.simp.SimpMessageType;
|
||||
import org.springframework.messaging.support.MessageBuilder;
|
||||
|
||||
import static org.fest.assertions.Assertions.assertThat;
|
||||
|
||||
|
||||
public class SimpDestinationMessageMatcherTests {
|
||||
MessageBuilder<String> messageBuilder;
|
||||
@@ -99,5 +99,14 @@ public class SimpDestinationMessageMatcherTests {
|
||||
assertThat(matcher.matches(messageBuilder.build())).isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void typeConstructorParameterIsTransmitted() throws Exception {
|
||||
matcher = new SimpDestinationMessageMatcher("/match", SimpMessageType.MESSAGE);
|
||||
|
||||
MessageMatcher<Object> expectedTypeMatcher = new SimpMessageTypeMatcher(SimpMessageType.MESSAGE);
|
||||
|
||||
assertThat(matcher.getMessageTypeMatcher()).isEqualTo(expectedTypeMatcher);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user