Documentation
¶
Index ¶
- Constants
- func NewResponse(data protoiface.MessageV1) cosmosclient.Response
- func NewTestAccount(t *testing.T, name string) cosmosaccount.Account
- type AccountInfo
- type AppState
- type Auth
- type BankClient
- type Body
- type Genesis
- type GenesisAccount
- type Gentx
- type LaunchClient
- type Message
- type MessagePubKey
- type MessageValue
- type ProfileClient
- type ProjectClient
- type RewardClient
- type Staking
- type StakingClient
- type StakingParams
- type Suite
Constants ¶
View Source
const ( ChainSourceHash = "testhash" ChainSourceURL = "http://example.com/test" ChainConfigYML = "config.yml" ChainName = "test" ChainID = "test-1" TCPAddress = "1.2.3.4" NodeID = "9b1f4adbfb0c0b513040d914bfb717303c0eaa71" PeerAddress = "9b1f4adbfb0c0b513040d914bfb717303c0eaa71@1.2.3.4" )
View Source
const ( LaunchID = uint64(1) ProjectID = uint64(1) MainnetID = uint64(1) )
View Source
const (
TestAccountName = "test"
)
Variables ¶
This section is empty.
Functions ¶
func NewResponse ¶
func NewResponse(data protoiface.MessageV1) cosmosclient.Response
NewResponse creates cosmosclient.Response object from proto struct for using as a return result for a cosmosclient mock.
func NewTestAccount ¶
func NewTestAccount(t *testing.T, name string) cosmosaccount.Account
NewTestAccount creates an account for test purposes using in-memory keyring backend.
Types ¶
type AccountInfo ¶
type Auth ¶
type Auth struct {
Accounts []GenesisAccount `json:"accounts"`
}
type BankClient ¶
type BankClient interface {
banktypes.QueryClient
}
type Genesis ¶
func NewGenesis ¶
NewGenesis creates easily modifiable genesis object for testing purposes.
func (*Genesis) AddAccount ¶
AddAccount adds account to the genesis.
type GenesisAccount ¶
type GenesisAccount struct {
Address string `json:"address"`
}
type Gentx ¶
type Gentx struct {
Body Body `json:"body"`
}
type LaunchClient ¶
type LaunchClient interface {
launchtypes.QueryClient
}
type Message ¶
type Message struct {
DelegatorAddress string `json:"delegator_address"`
ValidatorAddress string `json:"validator_address"`
PubKey MessagePubKey `json:"pubkey"`
Value MessageValue `json:"value"`
}
type MessagePubKey ¶
type MessagePubKey struct {
Key string `json:"key"`
}
type MessageValue ¶
type ProfileClient ¶
type ProfileClient interface {
profiletypes.QueryClient
}
type ProjectClient ¶
type ProjectClient interface {
projecttypes.QueryClient
}
type RewardClient ¶
type RewardClient interface {
rewardtypes.QueryClient
}
type Staking ¶
type Staking struct {
Params StakingParams `json:"params"`
}
type StakingClient ¶
type StakingClient interface {
stakingtypes.QueryClient
}
type StakingParams ¶
type StakingParams struct {
BondDenom string `json:"bond_denom"`
}
type Suite ¶
type Suite struct {
ChainMock *mocks.Chain
CosmosClientMock *mocks.CosmosClient
LaunchQueryMock *mocks.LaunchClient
ProjectQueryMock *mocks.ProjectClient
ProfileQueryMock *mocks.ProfileClient
RewardClient *mocks.RewardClient
StakingClient *mocks.StakingClient
BankClient *mocks.BankClient
MonitoringConsumerClient *mocks.MonitoringcClient
}
Suite is a mocks container, used to write less code for tests setup.
func (*Suite) AssertAllMocks ¶
AssertAllMocks asserts all suite mocks expectations.
Click to show internal directories.
Click to hide internal directories.