Skip to content

Commit

Permalink
fix issue #38
Browse files Browse the repository at this point in the history
  • Loading branch information
chenby committed Sep 4, 2020
1 parent 78b60cb commit ee539e5
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,15 @@
import static com.moilioncircle.redis.replicator.rdb.datatype.EvictType.LFU;
import static com.moilioncircle.redis.replicator.rdb.datatype.EvictType.LRU;
import static com.moilioncircle.redis.replicator.rdb.datatype.EvictType.NONE;
import static org.junit.Assert.assertTrue;

/**
* @author Leon Chen
* @since 2.1.0
*/
public class PingParserTest extends AbstractParserTest {
@Test
@SuppressWarnings("deprecation")
public void parse() {
{
PingParser parser = new PingParser();
Expand Down Expand Up @@ -137,6 +139,18 @@ public void parse() {
assertEquals("fie", cmd.getField());
assertEquals("val", cmd.getValue());
}

{
HSetParser parser = new HSetParser();
HSetCommand cmd = parser.parse(toObjectArray("hset key fie val fie1 val1".split(" ")));
assertEquals("key", cmd.getKey());
assertEquals("fie", cmd.getField());
assertEquals("val", cmd.getValue());
assertTrue(cmd.getFields().containsKey("fie".getBytes()));
assertTrue(cmd.getFields().containsKey("fie1".getBytes()));
assertEquals("val", cmd.getFields().get("fie".getBytes()));
assertEquals("val1", cmd.getFields().get("fie1".getBytes()));
}

{
LSetParser parser = new LSetParser();
Expand Down

0 comments on commit ee539e5

Please sign in to comment.