Search in sources :

Example 1 with IncrByParser

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

the class ParserTest method testIncrByParser.

@Test
public void testIncrByParser() {
    String command = "INCRBY key 100";
    KVEntry builder = new IncrByParser().parse(parseCommand(command));
    Assert.assertEquals("INCRBY", builder.getCommand());
    Assert.assertEquals("key", builder.getKey());
    Assert.assertTrue(100L == builder.getParam(Options.REDIS_INCREMENT));
}
Also used : KVEntry(org.apache.rocketmq.connect.redis.pojo.KVEntry) ZIncrByParser(org.apache.rocketmq.connect.redis.parser.ZIncrByParser) HIncrByParser(org.apache.rocketmq.connect.redis.parser.HIncrByParser) IncrByParser(org.apache.rocketmq.connect.redis.parser.IncrByParser) Test(org.junit.Test)

Aggregations

HIncrByParser (org.apache.rocketmq.connect.redis.parser.HIncrByParser)1 IncrByParser (org.apache.rocketmq.connect.redis.parser.IncrByParser)1 ZIncrByParser (org.apache.rocketmq.connect.redis.parser.ZIncrByParser)1 KVEntry (org.apache.rocketmq.connect.redis.pojo.KVEntry)1 Test (org.junit.Test)1