Search in sources :

Example 1 with ZPopMaxParser

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

the class ParserTest method testZPopMaxParser.

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

Aggregations

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