Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MockStore ¶
func MockStore() (store.KVStoreService, context.Context)
MockStore returns a mock store.KVStoreService and a mock context.Context. They can be used to test collections.
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 behaviour of a KeyCodec over the type T.
func TestValueCodec ¶
func TestValueCodec[T any](t *testing.T, encoder codec.ValueCodec[T], value T)
TestValueCodec asserts the correct behaviour of a ValueCodec over the type T.
Types ¶
This section is empty.