Search in sources :

Example 1 with SetNxParser

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

the class ParserTest method testSetNxParser.

@Test
public void testSetNxParser() {
    String command = "SETNX a b";
    KVEntry builder = new SetNxParser().parse(parseCommand(command));
    Assert.assertEquals("SETNX", builder.getCommand());
    Assert.assertEquals("a", builder.getKey());
    Assert.assertEquals("b", builder.getValue());
}
Also used : SetNxParser(org.apache.rocketmq.connect.redis.parser.SetNxParser) MSetNxParser(org.apache.rocketmq.connect.redis.parser.MSetNxParser) HSetNxParser(org.apache.rocketmq.connect.redis.parser.HSetNxParser) KVEntry(org.apache.rocketmq.connect.redis.pojo.KVEntry) Test(org.junit.Test)

Aggregations

HSetNxParser (org.apache.rocketmq.connect.redis.parser.HSetNxParser)1 MSetNxParser (org.apache.rocketmq.connect.redis.parser.MSetNxParser)1 SetNxParser (org.apache.rocketmq.connect.redis.parser.SetNxParser)1 KVEntry (org.apache.rocketmq.connect.redis.pojo.KVEntry)1 Test (org.junit.Test)1