Search in sources :

Example 1 with SwapDbParser

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

the class ParserTest method testSwapDbParser.

@Test
public void testSwapDbParser() {
    String command = "SWAPDB 0 1";
    KVEntry builder = new SwapDbParser().parse(parseCommand(command));
    Assert.assertEquals("SWAPDB", builder.getCommand());
    Assert.assertEquals("0", builder.getKey());
    Assert.assertEquals("1", builder.getValue());
}
Also used : KVEntry(org.apache.rocketmq.connect.redis.pojo.KVEntry) SwapDbParser(org.apache.rocketmq.connect.redis.parser.SwapDbParser) Test(org.junit.Test)

Aggregations

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