Skip to content

Commit

Permalink
[FAB-13003] Reimplement client test in ginkgo
Browse files Browse the repository at this point in the history
- reimplement client_test.go and prover_test.go in ginkgo
  as the rest of unit tests for token component
- use counterfeiter to generate mocked code
- remove mockery generated code under mocks dir

Change-Id: Ic77e5c52b7bc972209caa0c9d912304cb5497868
Signed-off-by: Wenjian Qiao <wenjianq@gmail.com>
  • Loading branch information
wenjianqiao committed Nov 27, 2018
1 parent 8bb2d60 commit 5ace584
Show file tree
Hide file tree
Showing 16 changed files with 1,222 additions and 803 deletions.
4 changes: 2 additions & 2 deletions token/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
tk "github.com/hyperledger/fabric/token"
)

//go:generate mockery -dir . -name Prover -case underscore -output ./mocks/
//go:generate counterfeiter -o mock/prover.go -fake-name Prover . Prover

type Prover interface {

Expand All @@ -31,7 +31,7 @@ type Prover interface {
RequestTransfer(tokenIDs [][]byte, shares []*token.RecipientTransferShare, signingIdentity tk.SigningIdentity) ([]byte, error)
}

//go:generate mockery -dir . -name FabricTxSubmitter -case underscore -output ./mocks/
//go:generate counterfeiter -o mock/fabric_tx_submitter.go -fake-name FabricTxSubmitter . FabricTxSubmitter

type FabricTxSubmitter interface {

Expand Down
Loading

0 comments on commit 5ace584

Please sign in to comment.