github.com/yacovm/fabric@v2.0.0-alpha.0.20191128145320-c5d4087dc723+incompatible/core/scc/lscc/lscc_suite_test.go (about)

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