mocks

package
v27.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockPairPublisher

type MockPairPublisher struct {
	PublishPoolPairsError       error
	PublishPoolPairsCalled      bool
	CalledWithPools             []poolmanagertypes.PoolI
	CalledWithCreatedPoolIDs    map[uint64]commondomain.PoolCreation
	NumPoolPairPublished        int
	NumPoolPairWithCreationData int
}

MockPairPublisher is a mock implementation of the PairPublisherI interface.

func (*MockPairPublisher) PublishPoolPairs

func (m *MockPairPublisher) PublishPoolPairs(ctx sdk.Context, pools []poolmanagertypes.PoolI, createdPoolIDs map[uint64]commondomain.PoolCreation) error

type PublisherMock

type PublisherMock struct {
	CalledWithPair                   indexerdomain.Pair
	CalledWithBlock                  indexerdomain.Block
	CalledWithTokenSupply            indexerdomain.TokenSupply
	CalledWithTokenSupplyOffset      indexerdomain.TokenSupplyOffset
	CalledWithTransaction            indexerdomain.Transaction
	NumPublishPairCalls              int
	NumPublishPairCallsWithCreation  int
	PublishPairCallMutex             sync.Mutex
	NumPublishBlockCalls             int
	NumPublishTokenSupplyCalls       int
	NumPublishTokenSupplyOffsetCalls int
	NumPublishTransactionCalls       int
	ForcePairError                   error
	ForceBlockError                  error
	ForceTokenSupplyError            error
	ForceTokenSupplyOffsetError      error
	ForceTransactionError            error
}

PublisherMock is a mock for Publisher.

func (*PublisherMock) PublishBlock

func (p *PublisherMock) PublishBlock(ctx context.Context, block indexerdomain.Block) error

PublishBlock implements domain.Publisher.

func (*PublisherMock) PublishPair

func (p *PublisherMock) PublishPair(ctx context.Context, pair indexerdomain.Pair) error

PublishPair implements domain.Publisher.

func (*PublisherMock) PublishTokenSupply

func (p *PublisherMock) PublishTokenSupply(ctx context.Context, tokenSupply indexerdomain.TokenSupply) error

PublishTokenSupply implements domain.Publisher.

func (*PublisherMock) PublishTokenSupplyOffset

func (p *PublisherMock) PublishTokenSupplyOffset(ctx context.Context, tokenSupplyOffset indexerdomain.TokenSupplyOffset) error

PublishTokenSupplyOffset implements domain.Publisher.

func (*PublisherMock) PublishTransaction

func (p *PublisherMock) PublishTransaction(ctx context.Context, txn indexerdomain.Transaction) error

PublishTransaction implements domain.Publisher.

Jump to

Keyboard shortcuts

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