package cn.com.flaginfo.echat.redis.test;

import java.util.Date;

import me.chyxion.tigon.redis.pub.PubProducer;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

/**
 * @version 0.0.1
 * @since 0.0.1
 * @author Shaun Chyxion <br>
 * chyxion@163.com <br>
 * Nov 9, 2015 9:08:17 AM
 */
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration({
    "classpath:spring/spring-echat-redis.xml",
    "classpath:spring/spring-redis-test.xml",
})
public class TestPub {
    @Autowired
    private PubProducer pp;

    @Test
    public void testRun() {
        pp.publish("MESSAGE", "Hello, Redis Pub!" + new Date());
    }
}
