Search in sources :

Example 1 with HIncrByParser

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

the class ParserTest method testHIncrByParser.

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

Aggregations

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