Search in sources :

Example 1 with PublishParser

use of org.apache.rocketmq.connect.redis.parser.PublishParser in project rocketmq-externals by apache.

the class ParserTest method testPublishParser.

@Test
public void testPublishParser() {
    String command = "Publish channel message";
    KVEntry builder = new PublishParser().parse(parseCommand(command));
    Assert.assertEquals("Publish", builder.getCommand());
    Assert.assertEquals("channel", builder.getKey());
    Assert.assertEquals("message", builder.getValue());
}
Also used : KVEntry(org.apache.rocketmq.connect.redis.pojo.KVEntry) PublishParser(org.apache.rocketmq.connect.redis.parser.PublishParser) Test(org.junit.Test)

Aggregations

PublishParser (org.apache.rocketmq.connect.redis.parser.PublishParser)1 KVEntry (org.apache.rocketmq.connect.redis.pojo.KVEntry)1 Test (org.junit.Test)1