use of org.apache.rocketmq.connect.redis.parser.RPushParser in project rocketmq-externals by apache.
the class ParserTest method testRPushParser.
@Test
public void testRPushParser() {
String command = "RPUSH key v1 v2";
KVEntry builder = new RPushParser().parse(parseCommand(command));
Assert.assertEquals("RPUSH", 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