github.com/hechain20/hechain@v0.0.0-20220316014945-b544036ba106/core/scc/lscc/lscc_suite_test.go (about) 1 /* 2 Copyright hechain. All Rights Reserved. 3 4 SPDX-License-Identifier: Apache-2.0 5 */ 6 7 package lscc_test 8 9 import ( 10 "testing" 11 12 commonledger "github.com/hechain20/hechain/common/ledger" 13 "github.com/hechain20/hechain/core/common/ccprovider" 14 "github.com/hechain20/hechain/core/common/sysccprovider" 15 "github.com/hechain20/hechain/core/ledger" 16 "github.com/hechain20/hechain/core/scc/lscc" 17 "github.com/hyperledger/fabric-chaincode-go/shim" 18 . "github.com/onsi/ginkgo" 19 . "github.com/onsi/gomega" 20 ) 21 22 //go:generate counterfeiter -o mock/chaincode_builder.go --fake-name ChaincodeBuilder . chaincodeBuilder 23 type chaincodeBuilder interface { 24 lscc.ChaincodeBuilder 25 } 26 27 //go:generate counterfeiter -o mock/system_chaincode_provider.go --fake-name SystemChaincodeProvider . systemChaincodeProvider 28 type systemChaincodeProvider interface { 29 sysccprovider.SystemChaincodeProvider 30 } 31 32 //go:generate counterfeiter -o mock/query_executor.go --fake-name QueryExecutor . queryExecutor 33 type queryExecutor interface { 34 ledger.QueryExecutor 35 } 36 37 //go:generate counterfeiter -o mock/fs_support.go --fake-name FileSystemSupport . fileSystemSupport 38 type fileSystemSupport interface { 39 lscc.FilesystemSupport 40 } 41 42 //go:generate counterfeiter -o mock/cc_package.go --fake-name CCPackage . ccPackage 43 type ccPackage interface { 44 ccprovider.CCPackage 45 } 46 47 //go:generate counterfeiter -o mock/chaincode_stub.go --fake-name ChaincodeStub . chaincodeStub 48 type chaincodeStub interface { 49 shim.ChaincodeStubInterface 50 } 51 52 //go:generate counterfeiter -o mock/state_query_iterator.go --fake-name StateQueryIterator . stateQueryIterator 53 type stateQueryIterator interface { 54 shim.StateQueryIteratorInterface 55 } 56 57 //go:generate counterfeiter -o mock/results_iterator.go --fake-name ResultsIterator . resultsIterator 58 type resultsIterator interface { 59 commonledger.ResultsIterator 60 } 61 62 func TestLscc(t *testing.T) { 63 RegisterFailHandler(Fail) 64 RunSpecs(t, "Lscc Suite") 65 }