Search in sources :

Example 1 with ZRemRangeByLexParser

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

the class ParserTest method testZRemRangeByLexParser.

@Test
public void testZRemRangeByLexParser() {
    String command = "ZRemRangeByLex key 0 10";
    KVEntry builder = new ZRemRangeByLexParser().parse(parseCommand(command));
    Assert.assertEquals("ZRemRangeByLex", builder.getCommand());
    Assert.assertEquals("key", builder.getKey());
    List<String> res = (List<String>) builder.getValue();
    Assert.assertEquals(2, res.size());
    Assert.assertEquals("0", res.get(0));
    Assert.assertEquals("10", res.get(1));
}
Also used : KVEntry(org.apache.rocketmq.connect.redis.pojo.KVEntry) List(java.util.List) ZRemRangeByLexParser(org.apache.rocketmq.connect.redis.parser.ZRemRangeByLexParser) Test(org.junit.Test)

Aggregations

List (java.util.List)1 ZRemRangeByLexParser (org.apache.rocketmq.connect.redis.parser.ZRemRangeByLexParser)1 KVEntry (org.apache.rocketmq.connect.redis.pojo.KVEntry)1 Test (org.junit.Test)1