Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MockValueCodec ¶
func MockValueCodec[T any]() codec.ValueCodec[T]
MockValueCodec returns a mock of collections.ValueCodec for type T, it can be used for collections Values testing. It also supports interfaces. For the interfaces cases, in order for an interface to be decoded it must have been encoded first. Not concurrency safe. EG: Let's say the value is interface Animal if I want to decode Dog which implements Animal, then I need to first encode it in order to make the type known by the MockValueCodec.
func TestKeyCodec ¶
TestKeyCodec asserts the correct behavior of a KeyCodec over the type T.
Types ¶
type StoreService ¶
type StoreService struct{}
func MockStore ¶
func MockStore() (*StoreService, context.Context)
MockStore returns a mock store.KVStoreService and a mock context.Context. They can be used to test collections. The StoreService.NewStoreContext can be used to instantiate a new empty KVStore.
func (StoreService) NewStoreContext ¶
func (s StoreService) NewStoreContext() context.Context