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