use of org.apache.rocketmq.connect.redis.parser.LPushParser in project rocketmq-externals by apache.
the class ParserTest method testLPushParser.
@Test
public void testLPushParser() {
String command = "LPUSH key v1 v2";
KVEntry builder = new LPushParser().parse(parseCommand(command));
Assert.assertEquals("LPUSH", builder.getCommand());
Assert.assertEquals("key", builder.getKey());
List<String> res = (List<String>) builder.getValue();
Assert.assertEquals(2, res.size());
Assert.assertEquals("v1", res.get(0));
Assert.assertEquals("v2", res.get(1));
}
Aggregations