Documentation ¶
Index ¶
- Constants
- type MockLogger
- type TestHelper
- func (t *TestHelper) Basedir() string
- func (t *TestHelper) Close()
- func (t *TestHelper) Commit(state contract.StateSandbox)
- func (t *TestHelper) Deploy(module, lang, contractName string, bin []byte, args map[string][]byte) (*contract.Response, error)
- func (t *TestHelper) Invoke(module, contractName, method string, args map[string][]byte) (*contract.Response, error)
- func (t *TestHelper) Manager() contract.Manager
- func (t *TestHelper) State() *sandbox.MemXModel
- func (t *TestHelper) UTXOState() *contract.UTXORWSet
- func (t *TestHelper) Upgrade(contractName string, bin []byte) error
Constants ¶
View Source
const ( ContractAccount = "XC1111111111111111@xuper" ContractAccount2 = "XC2222222222222222@xuper" FeaturesContractName = "features" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockLogger ¶ added in v1.0.2
func NewMockLogger ¶ added in v1.0.2
func NewMockLogger() *MockLogger
func (*MockLogger) GetLogId ¶ added in v1.0.2
func (*MockLogger) GetLogId() string
func (*MockLogger) SetCommField ¶ added in v1.0.2
func (*MockLogger) SetCommField(key string, value interface{})
func (*MockLogger) SetInfoField ¶ added in v1.0.2
func (*MockLogger) SetInfoField(key string, value interface{})
type TestHelper ¶
type TestHelper struct {
// contains filtered or unexported fields
}
func NewTestHelper ¶
func NewTestHelper(cfg *contract.ContractConfig) *TestHelper
func (*TestHelper) Basedir ¶
func (t *TestHelper) Basedir() string
func (*TestHelper) Close ¶
func (t *TestHelper) Close()
func (*TestHelper) Commit ¶
func (t *TestHelper) Commit(state contract.StateSandbox)
func (*TestHelper) Manager ¶
func (t *TestHelper) Manager() contract.Manager
func (*TestHelper) State ¶
func (t *TestHelper) State() *sandbox.MemXModel
func (*TestHelper) UTXOState ¶ added in v1.0.2
func (t *TestHelper) UTXOState() *contract.UTXORWSet
Click to show internal directories.
Click to hide internal directories.