(t *testing.T)
| 14 | ) |
| 15 | |
| 16 | func TestWriteAndGetOnCache(t *testing.T) { |
| 17 | t.Parallel() |
| 18 | |
| 19 | // given |
| 20 | cache, _ := New(context.Background(), DefaultConfig(5*time.Second)) |
| 21 | value := []byte("value") |
| 22 | |
| 23 | // when |
| 24 | cache.Set("key", value) |
| 25 | cachedValue, err := cache.Get("key") |
| 26 | |
| 27 | // then |
| 28 | noError(t, err) |
| 29 | assertEqual(t, value, cachedValue) |
| 30 | } |
| 31 | |
| 32 | func TestAppendAndGetOnCache(t *testing.T) { |
| 33 | t.Parallel() |
nothing calls this directly
no test coverage detected
searching dependent graphs…