package main

import (
	"fmt"
	"github.com/hyperledger/fabric/core/chaincode/shim"
	"testing"
)

func TestBeanChainCode_Invoke(t *testing.T) {
	cc := new(TestCC)
	stub := shim.NewMockStub("BeanCC", cc)
	stub.MockInit("init", nil)

	fmt.Println("========================================invoke FinancingInfoBean Management getFinancingById============================================")

	responseByAddFin := stub.MockInvoke("invoke1", [][]byte{[]byte("testCheck")})
	if responseByAddFin.Status != 200 {
		t.Error(fmt.Printf("Invoke status %d,message %s and payload %s\n", responseByAddFin.Status, responseByAddFin.Message, string(responseByAddFin.Payload)))
	}
}
