Search in sources :

Example 1 with LRemParser

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

the class ParserTest method testLRemParser.

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

Aggregations

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