github.com/osdi23p228/fabric@v0.0.0-20221218062954-77808885f5db/core/common/sysccprovider/sysccprovider_test.go (about)

     1  /*
     2  Copyright IBM Corp. All Rights Reserved.
     3  
     4  SPDX-License-Identifier: Apache-2.0
     5  */
     6  
     7  package sysccprovider
     8  
     9  import (
    10  	"testing"
    11  
    12  	"github.com/stretchr/testify/assert"
    13  )
    14  
    15  func TestString(t *testing.T) {
    16  	chaincodeInstance := ChaincodeInstance{
    17  		ChannelID:        "ChannelID",
    18  		ChaincodeName:    "ChaincodeName",
    19  		ChaincodeVersion: "ChaincodeVersion",
    20  	}
    21  
    22  	assert.NotNil(t, chaincodeInstance.String(), "str should not be nil")
    23  	assert.Equal(t, chaincodeInstance.String(), "ChannelID.ChaincodeName#ChaincodeVersion", "str should be the correct value")
    24  }