Search in sources :

Example 1 with MoveParser

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

the class ParserTest method testMoveParser.

@Test
public void testMoveParser() {
    String command = "move key 1";
    KVEntry builder = new MoveParser().parse(parseCommand(command));
    Assert.assertEquals("move", builder.getCommand());
    Assert.assertEquals("key", builder.getKey());
    Assert.assertTrue(1 == builder.getParam(Options.REDIS_DB_INDEX));
}
Also used : KVEntry(org.apache.rocketmq.connect.redis.pojo.KVEntry) MoveParser(org.apache.rocketmq.connect.redis.parser.MoveParser) SMoveParser(org.apache.rocketmq.connect.redis.parser.SMoveParser) Test(org.junit.Test)

Aggregations

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