Search in sources :

Example 1 with LSetParser

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

the class ParserTest method testLSetParser.

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

Aggregations

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