test

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockHTTPServer

type MockHTTPServer struct {
	*httptest.Server

	Counter  int
	Response interface{}
	// contains filtered or unexported fields
}

MockHTTPServer is a mocked HTTP server

func MockHTTP

func MockHTTP(s *suite.Suite, response interface{}) (mock *MockHTTPServer, close func())

MockHTTP creates a new MockHTTPServer given a response, or array of responses

type MockJSONRPCServer

type MockJSONRPCServer struct {
	*httptest.Server

	Counter  int
	Response interface{}
	// contains filtered or unexported fields
}

MockJSONRPCServer is a mocked RPC server

func MockJSONRPC

func MockJSONRPC(s *suite.Suite, response interface{}) (mock *MockJSONRPCServer, close func())

MockJSONRPC creates a new MockJSONRPCServer given a response, or array of responses

type MockXcTx added in v0.3.0

type MockXcTx struct {
	SerializedSignedTx []byte
}

An object that only supports .Serialize for SubmitTx()

func (*MockXcTx) AddSignatures added in v0.3.0

func (tx *MockXcTx) AddSignatures(...xc.TxSignature) error

func (*MockXcTx) Hash added in v0.3.0

func (tx *MockXcTx) Hash() xc.TxHash

func (*MockXcTx) Serialize added in v0.3.0

func (tx *MockXcTx) Serialize() ([]byte, error)

func (*MockXcTx) Sighashes added in v0.3.0

func (tx *MockXcTx) Sighashes() ([]xc.TxDataToSign, error)

Jump to

Keyboard shortcuts

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