Search in sources :

Example 1 with XDelParser

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

the class ParserTest method testXDelParser.

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

Aggregations

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