Search in sources :

Example 1 with ZRemParser

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

the class ParserTest method testZRemParser.

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

Aggregations

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