Search in sources :

Example 1 with PfCountParser

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

the class ParserTest method testPfCountParser.

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

Aggregations

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