MCPcopy Create free account
hub / github.com/douyu/jupiter-layout / NewMockExampleInterface

Function NewMockExampleInterface

internal/pkg/grpc/mock_ExampleInterface.go:45–55  ·  view source on GitHub ↗

NewMockExampleInterface creates a new instance of MockExampleInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

(t interface {
	mock.TestingT
	Cleanup(func())
})

Source from the content-addressed store, hash-verified

43// NewMockExampleInterface creates a new instance of MockExampleInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
44// The first argument is typically a *testing.T value.
45func NewMockExampleInterface(t interface {
46 mock.TestingT
47 Cleanup(func())
48}) *MockExampleInterface {
49 mock := &MockExampleInterface{}
50 mock.Mock.Test(t)
51
52 t.Cleanup(func() { mock.AssertExpectations(t) })
53
54 return mock
55}

Callers 1

case1Function · 0.92

Calls

no outgoing calls

Tested by 1

case1Function · 0.74