Search in sources :

Example 1 with GetsetParser

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

the class ParserTest method testGetsetParser.

@Test
public void testGetsetParser() {
    String command = "Getset key value";
    KVEntry builder = new GetsetParser().parse(parseCommand(command));
    Assert.assertEquals("Getset", builder.getCommand());
    Assert.assertEquals("key", builder.getKey());
    Assert.assertEquals("value", builder.getValue());
}
Also used : KVEntry(org.apache.rocketmq.connect.redis.pojo.KVEntry) GetsetParser(org.apache.rocketmq.connect.redis.parser.GetsetParser) Test(org.junit.Test)

Aggregations

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