Documentation ¶
Index ¶
- Constants
- type Mint
- type MintUser
- func (u *MintUser) CreateAsset(t *testing.T, code string, scale int8) mint.AssetResource
- func (u *MintUser) CreateOffer(t *testing.T, pair string, price string, amount *big.Int) mint.OfferResource
- func (u *MintUser) Get(t *testing.T, path string) (int, svc.Resp)
- func (u *MintUser) Post(t *testing.T, path string, params url.Values) (int, svc.Resp)
Constants ¶
View Source
const ( // PostLatency is the expected latency between a test running an the created // stamp of an object we created within a test. PostLatency time.Duration = 500 * time.Millisecond )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mint ¶
type Mint struct { Server *httptest.Server Mux *goji.Mux Env *env.Env DB *sqlx.DB Ctx context.Context TmpFile string }
Mint represents a test mint.
func CreateMint ¶
CreateMint creates a new test mint with an in-memory DB and returns test.Mint object.
func (*Mint) CreateUser ¶
CreateUser creates a user and generates an associated MintUser
type MintUser ¶
MintUser reprensents a user of a mint, generally generated by CreateUser.
func (*MintUser) CreateAsset ¶
CreateAsset creates a new assset for this test user
func (*MintUser) CreateOffer ¶
func (u *MintUser) CreateOffer( t *testing.T, pair string, price string, amount *big.Int, ) mint.OfferResource
CreateOffer creates a new ofer for this test user
Click to show internal directories.
Click to hide internal directories.