go-cyber/x/clock/types/codec_test.go

package types

import (
	"testing"

	"github.com/stretchr/testify/suite"

	codectypes "github.com/cosmos/cosmos-sdk/codec/types"
	sdk "github.com/cosmos/cosmos-sdk/types"
)

type CodecTestSuite struct {
	suite.Suite
}

func TestCodecSuite(t *testing.T) {
	suite.Run(t, new(CodecTestSuite))
}

func (suite *CodecTestSuite) TestRegisterInterfaces() {
	registry := codectypes.NewInterfaceRegistry()
	registry.RegisterInterface(sdk.MsgInterfaceProtoName, (*sdk.Msg)(nil))
	RegisterInterfaces(registry)

	impls := registry.ListImplementations(sdk.MsgInterfaceProtoName)
	suite.Require().Equal(4, len(impls))
	suite.Require().ElementsMatch([]string{
		"/cyber.clock.v1.MsgUpdateParams",
		"/cyber.clock.v1.MsgRegisterClockContract",
		"/cyber.clock.v1.MsgUnregisterClockContract",
		"/cyber.clock.v1.MsgUnjailClockContract",
	}, impls)
}

Synonyms

go-cyber/x/liquidity/types/codec_test.go
go-cyber/x/tokenfactory/types/codec_test.go

Neighbours