()
| 19 | } |
| 20 | |
| 21 | func newCacheNameExampleCache() *gotest.Cache { |
| 22 | // change the type of the value before testing |
| 23 | var ( |
| 24 | key = "foo1" |
| 25 | val = "bar1" |
| 26 | ) |
| 27 | |
| 28 | record1 := &cacheNameExampleData{ID: 1, Key: key, Value: val} |
| 29 | testData := map[string]interface{}{ |
| 30 | utils.Uint64ToStr(record1.ID): record1, |
| 31 | } |
| 32 | |
| 33 | c := gotest.NewCache(testData) |
| 34 | c.ICache = NewCacheNameExampleCache(&database.CacheType{ |
| 35 | CType: "redis", |
| 36 | Rdb: c.RedisClient, |
| 37 | }) |
| 38 | return c |
| 39 | } |
| 40 | |
| 41 | func Test_cacheNameExampleCache_Set(t *testing.T) { |
| 42 | c := newCacheNameExampleCache() |
no test coverage detected