Search in sources :

Example 1 with RenameParser

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

the class ParserTest method testRenameParser.

@Test
public void testRenameParser() {
    String command = "RENAME key newkey";
    KVEntry builder = new RenameParser().parse(parseCommand(command));
    Assert.assertEquals("RENAME", builder.getCommand());
    Assert.assertEquals("key", builder.getKey());
    Assert.assertEquals("newkey", builder.getValue());
}
Also used : KVEntry(org.apache.rocketmq.connect.redis.pojo.KVEntry) RenameParser(org.apache.rocketmq.connect.redis.parser.RenameParser) Test(org.junit.Test)

Aggregations

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