test

package module
v0.0.0-...-5525bef Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 14, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BenchCacheGetStruct

func BenchCacheGetStruct(b *testing.B, c cache.Cache)

func BenchCacheSetStruct

func BenchCacheSetStruct(b *testing.B, c cache.Cache)

func RunSute

func RunSute(t *testing.T, cache cache.Cache)

Types

type CacheMock

type CacheMock struct {
	// contains filtered or unexported fields
}

func NewCacheMock

func NewCacheMock(t *testing.T, opts ...OptionMock) *CacheMock

func (*CacheMock) Delete

func (c *CacheMock) Delete(ctx context.Context, key interface{}) error

func (*CacheMock) Get

func (c *CacheMock) Get(ctx context.Context, key, value interface{}) error

func (*CacheMock) Set

func (c *CacheMock) Set(ctx context.Context, key, value interface{}, ttl time.Duration) error

type CacheSuite

type CacheSuite struct {
	suite.Suite
	// contains filtered or unexported fields
}

func (*CacheSuite) TestCache_Delete

func (s *CacheSuite) TestCache_Delete()

func (*CacheSuite) TestCache_Get

func (s *CacheSuite) TestCache_Get()

func (*CacheSuite) TestCache_Get_Expired

func (s *CacheSuite) TestCache_Get_Expired()

type OptionMock

type OptionMock func(*CacheMock)

func WithDelete

func WithDelete(d func(ctx context.Context, t *testing.T, key interface{}) error) OptionMock

func WithGet

func WithGet(g func(ctx context.Context, t *testing.T, key, value interface{}) error) OptionMock

func WithSet

func WithSet(s func(ctx context.Context, t *testing.T, key, value interface{}, ttl time.Duration) error) OptionMock

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL