Search in sources :

Example 1 with ZIncrByParser

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

the class ParserTest method testZIncrByParser.

@Test
public void testZIncrByParser() {
    String command = "ZINCRBY key 100 member";
    KVEntry builder = new ZIncrByParser().parse(parseCommand(command));
    Assert.assertEquals("ZINCRBY", builder.getCommand());
    Assert.assertEquals("key", builder.getKey());
    Assert.assertEquals("member", builder.getValue());
    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) Test(org.junit.Test)

Aggregations

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