Documentation ¶
Index ¶
- type CantMetaAPIMock
- func (mock *CantMetaAPIMock) MetadataDatasetQuery(ctx context.Context, req cantabular.MetadataDatasetQueryRequest) (*cantabular.MetadataDatasetQuery, error)
- func (mock *CantMetaAPIMock) MetadataDatasetQueryCalls() []struct{ ... }
- func (mock *CantMetaAPIMock) MetadataTableQuery(ctx context.Context, req cantabular.MetadataTableQueryRequest) (*cantabular.MetadataTableQuery, error)
- func (mock *CantMetaAPIMock) MetadataTableQueryCalls() []struct{ ... }
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CantMetaAPIMock ¶ added in v1.1.0
type CantMetaAPIMock struct { // MetadataDatasetQueryFunc mocks the MetadataDatasetQuery method. MetadataDatasetQueryFunc func(ctx context.Context, req cantabular.MetadataDatasetQueryRequest) (*cantabular.MetadataDatasetQuery, error) // MetadataTableQueryFunc mocks the MetadataTableQuery method. MetadataTableQueryFunc func(ctx context.Context, req cantabular.MetadataTableQueryRequest) (*cantabular.MetadataTableQuery, error) // contains filtered or unexported fields }
CantMetaAPIMock is a mock implementation of api.CantMetaAPI.
func TestSomethingThatUsesCantMetaAPI(t *testing.T) { // make and configure a mocked api.CantMetaAPI mockedCantMetaAPI := &CantMetaAPIMock{ MetadataDatasetQueryFunc: func(ctx context.Context, req cantabular.MetadataDatasetQueryRequest) (*cantabular.MetadataDatasetQuery, error) { panic("mock out the MetadataDatasetQuery method") }, MetadataTableQueryFunc: func(ctx context.Context, req cantabular.MetadataTableQueryRequest) (*cantabular.MetadataTableQuery, error) { panic("mock out the MetadataTableQuery method") }, } // use mockedCantMetaAPI in code that requires api.CantMetaAPI // and then make assertions. }
func (*CantMetaAPIMock) MetadataDatasetQuery ¶ added in v1.1.0
func (mock *CantMetaAPIMock) MetadataDatasetQuery(ctx context.Context, req cantabular.MetadataDatasetQueryRequest) (*cantabular.MetadataDatasetQuery, error)
MetadataDatasetQuery calls MetadataDatasetQueryFunc.
func (*CantMetaAPIMock) MetadataDatasetQueryCalls ¶ added in v1.1.0
func (mock *CantMetaAPIMock) MetadataDatasetQueryCalls() []struct { Ctx context.Context Req cantabular.MetadataDatasetQueryRequest }
MetadataDatasetQueryCalls gets all the calls that were made to MetadataDatasetQuery. Check the length with:
len(mockedCantMetaAPI.MetadataDatasetQueryCalls())
func (*CantMetaAPIMock) MetadataTableQuery ¶ added in v1.1.0
func (mock *CantMetaAPIMock) MetadataTableQuery(ctx context.Context, req cantabular.MetadataTableQueryRequest) (*cantabular.MetadataTableQuery, error)
MetadataTableQuery calls MetadataTableQueryFunc.
func (*CantMetaAPIMock) MetadataTableQueryCalls ¶ added in v1.1.0
func (mock *CantMetaAPIMock) MetadataTableQueryCalls() []struct { Ctx context.Context Req cantabular.MetadataTableQueryRequest }
MetadataTableQueryCalls gets all the calls that were made to MetadataTableQuery. Check the length with:
len(mockedCantMetaAPI.MetadataTableQueryCalls())
Click to show internal directories.
Click to hide internal directories.