forked from TrueCloudLab/neoneo-go
neotest: add some high-level documentation
This commit is contained in:
parent
ab6fe44cab
commit
208e38803c
2 changed files with 25 additions and 0 deletions
7
pkg/neotest/chain/doc.go
Normal file
7
pkg/neotest/chain/doc.go
Normal file
|
@ -0,0 +1,7 @@
|
|||
/*
|
||||
Package chain contains functions creating new test blockchain instances.
|
||||
Different configurations can be used, but all chains created here use
|
||||
well-known keys. Most of the time single-node chain is the best choice to use
|
||||
unless you specifically need multiple validators and large committee.
|
||||
*/
|
||||
package chain
|
18
pkg/neotest/doc.go
Normal file
18
pkg/neotest/doc.go
Normal file
|
@ -0,0 +1,18 @@
|
|||
/*
|
||||
Package neotest contains framework for automated contract testing.
|
||||
It can be used to implement unit-tests for contracts in Go using regular Go
|
||||
conventions.
|
||||
|
||||
Usually it's used like this:
|
||||
* an instance of blockchain is created using chain subpackage
|
||||
* target contract is compiled using one of Compile* functions
|
||||
* and Executor is created for blockchain
|
||||
* it's used to deploy contract with DeployContract
|
||||
* CommitteeInvoker and/or ValidatorInvoker are then created to perform test invocations
|
||||
* if needed NewAccount is used to create appropriate number of accounts for the test
|
||||
|
||||
Higher-order methods provided in Executor and ContractInvoker hide the details
|
||||
of transaction creation for the most part, but there are lower-level methods as
|
||||
well that can be used for specific tasks.
|
||||
*/
|
||||
package neotest
|
Loading…
Reference in a new issue