(t *testing.T)
| 9 | ) |
| 10 | |
| 11 | func TestGetReturnsNoDataWhenNotCached(t *testing.T) { |
| 12 | cache := NewFileCache() |
| 13 | |
| 14 | value, expiry := cache.Get("UNKNOWN") |
| 15 | |
| 16 | if value != "" { |
| 17 | t.Errorf("Should not return any data from cache, but got: %v", value) |
| 18 | } |
| 19 | zero := time.Time{} |
| 20 | if expiry != zero { |
| 21 | t.Errorf("Should not return expiry value, but got: %v", expiry) |
| 22 | } |
| 23 | } |
| 24 | |
| 25 | func TestGetReturnsDataWhenSet(t *testing.T) { |
| 26 | cache := NewFileCache() |
nothing calls this directly
no test coverage detected