使用 Mock Shim 測試 Chaincode
此測試方法涉及使用 stub shim.ChaincodeStubInterface
的模擬版本。透過此,您可以在將鏈碼部署到 Oracle Blockchain Platform 之前模擬鏈碼的某些功能。您也可以使用此程式庫來建立鏈碼的單元測試。
附註:
並未實行 stub 的所有介面。Stub 函數-
GetQueryResult
-
GetHistoryForKey