SetEqual verify that the return value of the set operation is correct
(t *testing.T, key string, value string)
| 25 | |
| 26 | //SetEqual verify that the return value of the set operation is correct |
| 27 | func (es *ExampleString) SetEqual(t *testing.T, key string, value string) { |
| 28 | es.values[key] = value |
| 29 | reply, err := redis.String(es.conn.Do("SET", key, value)) |
| 30 | assert.Equal(t, "OK", reply) |
| 31 | assert.NoError(t, err) |
| 32 | data, err := redis.Bytes(es.conn.Do("GET", key)) |
| 33 | assert.Equal(t, value, string(data)) |
| 34 | assert.NoError(t, err) |
| 35 | } |
| 36 | |
| 37 | //GetEqual verify that the return value of the get operation is correct |
| 38 | func (es *ExampleString) GetEqual(t *testing.T, key string) { |