Search in sources :

Example 1 with PSetExParser

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

the class ParserTest method testPSetExParser.

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

Aggregations

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