MCPcopy Create free account
hub / github.com/UiPath/uipathcli / TestGetReturnsNoDataWhenNotCached

Function TestGetReturnsNoDataWhenNotCached

cache/file_cache_test.go:11–23  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

9)
10
11func 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
25func TestGetReturnsDataWhenSet(t *testing.T) {
26 cache := NewFileCache()

Callers

nothing calls this directly

Calls 2

GetMethod · 0.95
NewFileCacheFunction · 0.85

Tested by

no test coverage detected