Documentation ¶
Index ¶
- type BoltRowsMock
- func (mock *BoltRowsMock) All() ([][]interface{}, map[string]interface{}, error)
- func (mock *BoltRowsMock) AllCalls() []struct{}
- func (mock *BoltRowsMock) Close() error
- func (mock *BoltRowsMock) CloseCalls() []struct{}
- func (mock *BoltRowsMock) Columns() []string
- func (mock *BoltRowsMock) ColumnsCalls() []struct{}
- func (mock *BoltRowsMock) Metadata() map[string]interface{}
- func (mock *BoltRowsMock) MetadataCalls() []struct{}
- func (mock *BoltRowsMock) NextNeo() ([]interface{}, map[string]interface{}, error)
- func (mock *BoltRowsMock) NextNeoCalls() []struct{}
- type CSVRowReaderMock
- type ConnMock
- func (mock *ConnMock) Begin() (driver.Tx, error)
- func (mock *ConnMock) BeginCalls() []struct{}
- func (mock *ConnMock) Close() error
- func (mock *ConnMock) CloseCalls() []struct{}
- func (mock *ConnMock) ExecNeo(query string, params map[string]interface{}) (golangNeo4jBoltDriver.Result, error)
- func (mock *ConnMock) ExecNeoCalls() []struct{ ... }
- func (mock *ConnMock) ExecPipeline(query []string, params ...map[string]interface{}) ([]golangNeo4jBoltDriver.Result, error)
- func (mock *ConnMock) ExecPipelineCalls() []struct{ ... }
- func (mock *ConnMock) PrepareNeo(query string) (golangNeo4jBoltDriver.Stmt, error)
- func (mock *ConnMock) PrepareNeoCalls() []struct{ ... }
- func (mock *ConnMock) PreparePipeline(query ...string) (golangNeo4jBoltDriver.PipelineStmt, error)
- func (mock *ConnMock) PreparePipelineCalls() []struct{ ... }
- func (mock *ConnMock) QueryNeo(query string, params map[string]interface{}) (golangNeo4jBoltDriver.Rows, error)
- func (mock *ConnMock) QueryNeoAll(query string, params map[string]interface{}) ([][]interface{}, map[string]interface{}, map[string]interface{}, error)
- func (mock *ConnMock) QueryNeoAllCalls() []struct{ ... }
- func (mock *ConnMock) QueryNeoCalls() []struct{ ... }
- func (mock *ConnMock) QueryPipeline(query []string, params ...map[string]interface{}) (golangNeo4jBoltDriver.PipelineRows, error)
- func (mock *ConnMock) QueryPipelineCalls() []struct{ ... }
- func (mock *ConnMock) SetChunkSize(in1 uint16)
- func (mock *ConnMock) SetChunkSizeCalls() []struct{ ... }
- func (mock *ConnMock) SetTimeout(in1 time.Duration)
- func (mock *ConnMock) SetTimeoutCalls() []struct{ ... }
- type DBConnectionMock
- type DBPoolMock
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BoltRowsMock ¶
type BoltRowsMock struct { // AllFunc mocks the All method. AllFunc func() ([][]interface{}, map[string]interface{}, error) // CloseFunc mocks the Close method. CloseFunc func() error // ColumnsFunc mocks the Columns method. ColumnsFunc func() []string // MetadataFunc mocks the Metadata method. MetadataFunc func() map[string]interface{} // NextNeoFunc mocks the NextNeo method. NextNeoFunc func() ([]interface{}, map[string]interface{}, error) // contains filtered or unexported fields }
BoltRowsMock is a mock implementation of BoltRows.
func TestSomethingThatUsesBoltRows(t *testing.T) { // make and configure a mocked BoltRows mockedBoltRows := &BoltRowsMock{ AllFunc: func() ([][]interface{}, map[string]interface{}, error) { panic("TODO: mock out the All method") }, CloseFunc: func() error { panic("TODO: mock out the Close method") }, ColumnsFunc: func() []string { panic("TODO: mock out the Columns method") }, MetadataFunc: func() map[string]interface{} { panic("TODO: mock out the Metadata method") }, NextNeoFunc: func() ([]interface{}, map[string]interface{}, error) { panic("TODO: mock out the NextNeo method") }, } // TODO: use mockedBoltRows in code that requires BoltRows // and then make assertions. }
func (*BoltRowsMock) All ¶
func (mock *BoltRowsMock) All() ([][]interface{}, map[string]interface{}, error)
All calls AllFunc.
func (*BoltRowsMock) AllCalls ¶
func (mock *BoltRowsMock) AllCalls() []struct { }
AllCalls gets all the calls that were made to All. Check the length with:
len(mockedBoltRows.AllCalls())
func (*BoltRowsMock) CloseCalls ¶
func (mock *BoltRowsMock) CloseCalls() []struct { }
CloseCalls gets all the calls that were made to Close. Check the length with:
len(mockedBoltRows.CloseCalls())
func (*BoltRowsMock) Columns ¶
func (mock *BoltRowsMock) Columns() []string
Columns calls ColumnsFunc.
func (*BoltRowsMock) ColumnsCalls ¶
func (mock *BoltRowsMock) ColumnsCalls() []struct { }
ColumnsCalls gets all the calls that were made to Columns. Check the length with:
len(mockedBoltRows.ColumnsCalls())
func (*BoltRowsMock) Metadata ¶
func (mock *BoltRowsMock) Metadata() map[string]interface{}
Metadata calls MetadataFunc.
func (*BoltRowsMock) MetadataCalls ¶
func (mock *BoltRowsMock) MetadataCalls() []struct { }
MetadataCalls gets all the calls that were made to Metadata. Check the length with:
len(mockedBoltRows.MetadataCalls())
func (*BoltRowsMock) NextNeo ¶
func (mock *BoltRowsMock) NextNeo() ([]interface{}, map[string]interface{}, error)
NextNeo calls NextNeoFunc.
func (*BoltRowsMock) NextNeoCalls ¶
func (mock *BoltRowsMock) NextNeoCalls() []struct { }
NextNeoCalls gets all the calls that were made to NextNeo. Check the length with:
len(mockedBoltRows.NextNeoCalls())
type CSVRowReaderMock ¶
type CSVRowReaderMock struct { // CloseFunc mocks the Close method. CloseFunc func() error // ReadFunc mocks the Read method. ReadFunc func() (string, error) // contains filtered or unexported fields }
CSVRowReaderMock is a mock implementation of CSVRowReader.
func TestSomethingThatUsesCSVRowReader(t *testing.T) { // make and configure a mocked CSVRowReader mockedCSVRowReader := &CSVRowReaderMock{ CloseFunc: func() error { panic("TODO: mock out the Close method") }, ReadFunc: func() (string, error) { panic("TODO: mock out the Read method") }, } // TODO: use mockedCSVRowReader in code that requires CSVRowReader // and then make assertions. }
func (*CSVRowReaderMock) CloseCalls ¶
func (mock *CSVRowReaderMock) CloseCalls() []struct { }
CloseCalls gets all the calls that were made to Close. Check the length with:
len(mockedCSVRowReader.CloseCalls())
func (*CSVRowReaderMock) Read ¶
func (mock *CSVRowReaderMock) Read() (string, error)
Read calls ReadFunc.
func (*CSVRowReaderMock) ReadCalls ¶
func (mock *CSVRowReaderMock) ReadCalls() []struct { }
ReadCalls gets all the calls that were made to Read. Check the length with:
len(mockedCSVRowReader.ReadCalls())
type ConnMock ¶
type ConnMock struct { // BeginFunc mocks the Begin method. BeginFunc func() (driver.Tx, error) // CloseFunc mocks the Close method. CloseFunc func() error // ExecNeoFunc mocks the ExecNeo method. ExecNeoFunc func(query string, params map[string]interface{}) (golangNeo4jBoltDriver.Result, error) // ExecPipelineFunc mocks the ExecPipeline method. ExecPipelineFunc func(query []string, params ...map[string]interface{}) ([]golangNeo4jBoltDriver.Result, error) // PrepareNeoFunc mocks the PrepareNeo method. PrepareNeoFunc func(query string) (golangNeo4jBoltDriver.Stmt, error) // PreparePipelineFunc mocks the PreparePipeline method. PreparePipelineFunc func(query ...string) (golangNeo4jBoltDriver.PipelineStmt, error) // QueryNeoFunc mocks the QueryNeo method. QueryNeoFunc func(query string, params map[string]interface{}) (golangNeo4jBoltDriver.Rows, error) // QueryNeoAllFunc mocks the QueryNeoAll method. QueryNeoAllFunc func(query string, params map[string]interface{}) ([][]interface{}, map[string]interface{}, map[string]interface{}, error) // QueryPipelineFunc mocks the QueryPipeline method. QueryPipelineFunc func(query []string, params ...map[string]interface{}) (golangNeo4jBoltDriver.PipelineRows, error) // SetChunkSizeFunc mocks the SetChunkSize method. SetChunkSizeFunc func(in1 uint16) // SetTimeoutFunc mocks the SetTimeout method. SetTimeoutFunc func(in1 time.Duration) // contains filtered or unexported fields }
ConnMock is a mock implementation of Conn.
func TestSomethingThatUsesConn(t *testing.T) { // make and configure a mocked Conn mockedConn := &ConnMock{ BeginFunc: func() (driver.Tx, error) { panic("TODO: mock out the Begin method") }, CloseFunc: func() error { panic("TODO: mock out the Close method") }, ExecNeoFunc: func(query string, params map[string]interface{}) (golangNeo4jBoltDriver.Result, error) { panic("TODO: mock out the ExecNeo method") }, ExecPipelineFunc: func(query []string, params ...map[string]interface{}) ([]golangNeo4jBoltDriver.Result, error) { panic("TODO: mock out the ExecPipeline method") }, PrepareNeoFunc: func(query string) (golangNeo4jBoltDriver.Stmt, error) { panic("TODO: mock out the PrepareNeo method") }, PreparePipelineFunc: func(query ...string) (golangNeo4jBoltDriver.PipelineStmt, error) { panic("TODO: mock out the PreparePipeline method") }, QueryNeoFunc: func(query string, params map[string]interface{}) (golangNeo4jBoltDriver.Rows, error) { panic("TODO: mock out the QueryNeo method") }, QueryNeoAllFunc: func(query string, params map[string]interface{}) ([][]interface{}, map[string]interface{}, map[string]interface{}, error) { panic("TODO: mock out the QueryNeoAll method") }, QueryPipelineFunc: func(query []string, params ...map[string]interface{}) (golangNeo4jBoltDriver.PipelineRows, error) { panic("TODO: mock out the QueryPipeline method") }, SetChunkSizeFunc: func(in1 uint16) { panic("TODO: mock out the SetChunkSize method") }, SetTimeoutFunc: func(in1 time.Duration) { panic("TODO: mock out the SetTimeout method") }, } // TODO: use mockedConn in code that requires Conn // and then make assertions. }
func (*ConnMock) BeginCalls ¶
func (mock *ConnMock) BeginCalls() []struct { }
BeginCalls gets all the calls that were made to Begin. Check the length with:
len(mockedConn.BeginCalls())
func (*ConnMock) CloseCalls ¶
func (mock *ConnMock) CloseCalls() []struct { }
CloseCalls gets all the calls that were made to Close. Check the length with:
len(mockedConn.CloseCalls())
func (*ConnMock) ExecNeo ¶
func (mock *ConnMock) ExecNeo(query string, params map[string]interface{}) (golangNeo4jBoltDriver.Result, error)
ExecNeo calls ExecNeoFunc.
func (*ConnMock) ExecNeoCalls ¶
ExecNeoCalls gets all the calls that were made to ExecNeo. Check the length with:
len(mockedConn.ExecNeoCalls())
func (*ConnMock) ExecPipeline ¶
func (mock *ConnMock) ExecPipeline(query []string, params ...map[string]interface{}) ([]golangNeo4jBoltDriver.Result, error)
ExecPipeline calls ExecPipelineFunc.
func (*ConnMock) ExecPipelineCalls ¶
func (mock *ConnMock) ExecPipelineCalls() []struct { Query []string Params []map[string]interface{} }
ExecPipelineCalls gets all the calls that were made to ExecPipeline. Check the length with:
len(mockedConn.ExecPipelineCalls())
func (*ConnMock) PrepareNeo ¶
PrepareNeo calls PrepareNeoFunc.
func (*ConnMock) PrepareNeoCalls ¶
PrepareNeoCalls gets all the calls that were made to PrepareNeo. Check the length with:
len(mockedConn.PrepareNeoCalls())
func (*ConnMock) PreparePipeline ¶
PreparePipeline calls PreparePipelineFunc.
func (*ConnMock) PreparePipelineCalls ¶
PreparePipelineCalls gets all the calls that were made to PreparePipeline. Check the length with:
len(mockedConn.PreparePipelineCalls())
func (*ConnMock) QueryNeo ¶
func (mock *ConnMock) QueryNeo(query string, params map[string]interface{}) (golangNeo4jBoltDriver.Rows, error)
QueryNeo calls QueryNeoFunc.
func (*ConnMock) QueryNeoAll ¶
func (mock *ConnMock) QueryNeoAll(query string, params map[string]interface{}) ([][]interface{}, map[string]interface{}, map[string]interface{}, error)
QueryNeoAll calls QueryNeoAllFunc.
func (*ConnMock) QueryNeoAllCalls ¶
QueryNeoAllCalls gets all the calls that were made to QueryNeoAll. Check the length with:
len(mockedConn.QueryNeoAllCalls())
func (*ConnMock) QueryNeoCalls ¶
QueryNeoCalls gets all the calls that were made to QueryNeo. Check the length with:
len(mockedConn.QueryNeoCalls())
func (*ConnMock) QueryPipeline ¶
func (mock *ConnMock) QueryPipeline(query []string, params ...map[string]interface{}) (golangNeo4jBoltDriver.PipelineRows, error)
QueryPipeline calls QueryPipelineFunc.
func (*ConnMock) QueryPipelineCalls ¶
func (mock *ConnMock) QueryPipelineCalls() []struct { Query []string Params []map[string]interface{} }
QueryPipelineCalls gets all the calls that were made to QueryPipeline. Check the length with:
len(mockedConn.QueryPipelineCalls())
func (*ConnMock) SetChunkSize ¶
SetChunkSize calls SetChunkSizeFunc.
func (*ConnMock) SetChunkSizeCalls ¶
SetChunkSizeCalls gets all the calls that were made to SetChunkSize. Check the length with:
len(mockedConn.SetChunkSizeCalls())
func (*ConnMock) SetTimeout ¶
SetTimeout calls SetTimeoutFunc.
func (*ConnMock) SetTimeoutCalls ¶
SetTimeoutCalls gets all the calls that were made to SetTimeout. Check the length with:
len(mockedConn.SetTimeoutCalls())
type DBConnectionMock ¶
type DBConnectionMock struct { // CloseFunc mocks the Close method. CloseFunc func() error // contains filtered or unexported fields }
DBConnectionMock is a mock implementation of DBConnection.
func TestSomethingThatUsesDBConnection(t *testing.T) { // make and configure a mocked DBConnection mockedDBConnection := &DBConnectionMock{ CloseFunc: func() error { panic("TODO: mock out the Close method") }, } // TODO: use mockedDBConnection in code that requires DBConnection // and then make assertions. }
func (*DBConnectionMock) CloseCalls ¶
func (mock *DBConnectionMock) CloseCalls() []struct { }
CloseCalls gets all the calls that were made to Close. Check the length with:
len(mockedDBConnection.CloseCalls())
type DBPoolMock ¶
type DBPoolMock struct { // OpenPoolFunc mocks the OpenPool method. OpenPoolFunc func() (golangNeo4jBoltDriver.Conn, error) // contains filtered or unexported fields }
DBPoolMock is a mock implementation of DBPool.
func TestSomethingThatUsesDBPool(t *testing.T) { // make and configure a mocked DBPool mockedDBPool := &DBPoolMock{ OpenPoolFunc: func() (golangNeo4jBoltDriver.Conn, error) { panic("TODO: mock out the OpenPool method") }, } // TODO: use mockedDBPool in code that requires DBPool // and then make assertions. }
func (*DBPoolMock) OpenPool ¶
func (mock *DBPoolMock) OpenPool() (golangNeo4jBoltDriver.Conn, error)
OpenPool calls OpenPoolFunc.
func (*DBPoolMock) OpenPoolCalls ¶
func (mock *DBPoolMock) OpenPoolCalls() []struct { }
OpenPoolCalls gets all the calls that were made to OpenPool. Check the length with:
len(mockedDBPool.OpenPoolCalls())