MCPcopy
hub / github.com/SpectoLabs/hoverfly / Test_LRUFastCache_GetAllEntries

Function Test_LRUFastCache_GetAllEntries

core/cache/lru_fastcache_test.go:57–71  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

55}
56
57func Test_LRUFastCache_GetAllEntries(t *testing.T) {
58 RegisterTestingT(t)
59
60 unit := cache.NewDefaultLRUCache()
61
62 unit.Set(testKey1, testValue1)
63 unit.Set(testKey2, testValue2)
64
65 entries, err := unit.GetAllEntries()
66 Expect(err).To(BeNil())
67
68 Expect(entries).To(HaveLen(2))
69 Expect(entries).To(HaveKeyWithValue(testKey1, testValue1))
70 Expect(entries).To(HaveKeyWithValue(testKey2, testValue2))
71}
72
73func Test_LRUFastCache_GetRecordCount(t *testing.T) {
74 RegisterTestingT(t)

Callers

nothing calls this directly

Calls 3

NewDefaultLRUCacheFunction · 0.92
SetMethod · 0.65
GetAllEntriesMethod · 0.65

Tested by

no test coverage detected