Search in sources :

Example 1 with SetBitParser

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

the class ParserTest method testSetBitParser.

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

Aggregations

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