Search in sources :

Example 1 with DecrByParser

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

the class ParserTest method testDecrByParser.

@Test
public void testDecrByParser() {
    String command = "DECRBY key 100";
    KVEntry builder = new DecrByParser().parse(parseCommand(command));
    Assert.assertEquals("DECRBY", 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) DecrByParser(org.apache.rocketmq.connect.redis.parser.DecrByParser) Test(org.junit.Test)

Aggregations

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