Documentation ¶
Index ¶
- func EventEqual(event *peer.ChaincodeEvent, expected *mapping.Event)
- func EventIs(event *peer.ChaincodeEvent, expectName string, expectPayload interface{}) interface{}
- func EventPayloadEqual(event *peer.ChaincodeEvent, expectedPayload interface{})
- func EventPayloadIs(event *peer.ChaincodeEvent, target interface{}) interface{}
- func EventStringerEqual(event *peer.ChaincodeEvent, expectName string, expectPayload interface{})
- func PayloadBytes(response peer.Response, expectedValue []byte) []byte
- func PayloadInt(response peer.Response, expectedValue int) int
- func PayloadIs(response peer.Response, target interface{}) interface{}
- func PayloadString(response peer.Response, expectedValue string) string
- func ResponseError(response peer.Response, errMatcher ...interface{}) peer.Response
- func ResponseOk(response peer.Response, okMatcher ...interface{}) peer.Response
- type Stringer
- type TxRes
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EventEqual ¶ added in v0.8.1
func EventEqual(event *peer.ChaincodeEvent, expected *mapping.Event)
EventEqual expects that *peer.ChaincodeEvent stringer equal to mapping.Event
func EventIs ¶ added in v0.6.1
func EventIs(event *peer.ChaincodeEvent, expectName string, expectPayload interface{}) interface{}
EventIs expects ChaincodeEvent name is equal to expectName and event payload can be marshaled to expectPayload
func EventPayloadEqual ¶ added in v0.8.1
func EventPayloadEqual(event *peer.ChaincodeEvent, expectedPayload interface{})
EventPayloadEqual
func EventPayloadIs ¶
func EventPayloadIs(event *peer.ChaincodeEvent, target interface{}) interface{}
EventPayloadIs expects peer.ChaincodeEvent payload can be marshaled to target interface{} and returns converted value
func EventStringerEqual ¶ added in v0.7.2
func EventStringerEqual(event *peer.ChaincodeEvent, expectName string, expectPayload interface{})
EventStringerEqual expects ChaincodeEvent name is equal to expectName and event payload String() equal expectPayload String()
func PayloadBytes ¶ added in v0.3.0
PayloadBytes expects response is ok and compares response.Payload with expected value
func PayloadIs ¶
PayloadIs expects peer.Response payload can be marshalled to target interface{} and returns converted value
func PayloadString ¶
PayloadString expects payload content is string
func ResponseError ¶
ResponseError expects peer.Response has shim.ERROR status and message has errMatcher matcher
Types ¶
type TxRes ¶ added in v0.6.7
type TxRes struct { Result interface{} Err error Event *peer.ChaincodeEvent }
func (*TxRes) HasNoError ¶ added in v0.6.10
func (*TxRes) ProduceEvent ¶ added in v0.6.7
ProduceEvent expects that tx produces event with particular payload