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 {
|
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() {
|
||||||
}
|
}
|
||||||
|
|
||||||
public RedisMessagePublisher(RedisTemplate<String, Object> redisTemplate,
|
public RedisMessagePublisher(final RedisTemplate<String, Object> redisTemplate,
|
||||||
ChannelTopic topic) {
|
final ChannelTopic topic) {
|
||||||
this.redisTemplate = redisTemplate;
|
this.redisTemplate = redisTemplate;
|
||||||
this.topic = topic;
|
this.topic = topic;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void publish(String message) {
|
public void publish(final String message) {
|
||||||
redisTemplate.convertAndSend(topic.getTopic(), message);
|
redisTemplate.convertAndSend(topic.getTopic(), message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,6 @@ import static org.junit.Assert.assertTrue;
|
||||||
@ContextConfiguration(classes = RedisConfig.class)
|
@ContextConfiguration(classes = RedisConfig.class)
|
||||||
public class RedisMessageListenerTest {
|
public class RedisMessageListenerTest {
|
||||||
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private RedisMessagePublisher redisMessagePublisher;
|
private RedisMessagePublisher redisMessagePublisher;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue