Refined the test case
This commit is contained in:
parent
a304aa9860
commit
2ccdd4ecbb
|
@ -3,5 +3,5 @@ package org.baeldung.spring.data.redis.queue;
|
|||
|
||||
public interface MessagePublisher {
|
||||
|
||||
void publish(String message);
|
||||
void publish(final String message);
|
||||
}
|
||||
|
|
|
@ -16,13 +16,13 @@ public class RedisMessagePublisher implements MessagePublisher {
|
|||
public RedisMessagePublisher() {
|
||||
}
|
||||
|
||||
public RedisMessagePublisher(RedisTemplate<String, Object> redisTemplate,
|
||||
ChannelTopic topic) {
|
||||
public RedisMessagePublisher(final RedisTemplate<String, Object> redisTemplate,
|
||||
final ChannelTopic topic) {
|
||||
this.redisTemplate = redisTemplate;
|
||||
this.topic = topic;
|
||||
}
|
||||
|
||||
public void publish(String message) {
|
||||
public void publish(final String message) {
|
||||
redisTemplate.convertAndSend(topic.getTopic(), message);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,7 +17,6 @@ import static org.junit.Assert.assertTrue;
|
|||
@ContextConfiguration(classes = RedisConfig.class)
|
||||
public class RedisMessageListenerTest {
|
||||
|
||||
|
||||
@Autowired
|
||||
private RedisMessagePublisher redisMessagePublisher;
|
||||
|
||||
|
|
Loading…
Reference in New Issue