use of org.apache.rocketmq.connect.redis.parser.SetExParser in project rocketmq-externals by apache.
the class ParserTest method testSetExParser.
@Test
public void testSetExParser() {
String command = "setex key 100 value";
KVEntry builder = new SetExParser().parse(parseCommand(command));
Assert.assertEquals("setex", builder.getCommand());
Assert.assertEquals("key", builder.getKey());
Assert.assertEquals("value", builder.getValue());
Assert.assertTrue(100 == builder.getParam(Options.REDIS_EX));
}
Aggregations