forked from hyperledger/fabric-sdk-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mockcorecontext.go
40 lines (32 loc) · 890 Bytes
/
mockcorecontext.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
Copyright SecureKey Technologies Inc. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
package mocks
import (
"github.com/hyperledger/fabric-sdk-go/pkg/common/providers/core"
"github.com/hyperledger/fabric-sdk-go/pkg/common/providers/msp"
)
// MockCoreContext is a mock core context
type MockCoreContext struct {
MockConfig core.Config
MockCcryptoSuite core.CryptoSuite
MockUserStore msp.UserStore
MockSigningManager core.SigningManager
}
// Config ...
func (m *MockCoreContext) Config() core.Config {
return m.MockConfig
}
// CryptoSuite ...
func (m *MockCoreContext) CryptoSuite() core.CryptoSuite {
return m.MockCcryptoSuite
}
// UserStore ...
func (m *MockCoreContext) UserStore() msp.UserStore {
return m.MockUserStore
}
// SigningManager ...
func (m *MockCoreContext) SigningManager() core.SigningManager {
return m.MockSigningManager
}