observationtest

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 6, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

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) Close

func (mock *BoltRowsMock) Close() error

Close calls CloseFunc.

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) Close

func (mock *CSVRowReaderMock) Close() error

Close calls CloseFunc.

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) Begin

func (mock *ConnMock) Begin() (driver.Tx, error)

Begin calls BeginFunc.

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) Close

func (mock *ConnMock) Close() error

Close calls CloseFunc.

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

func (mock *ConnMock) ExecNeoCalls() []struct {
	Query  string
	Params map[string]interface{}
}

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

func (mock *ConnMock) PrepareNeo(query string) (golangNeo4jBoltDriver.Stmt, error)

PrepareNeo calls PrepareNeoFunc.

func (*ConnMock) PrepareNeoCalls

func (mock *ConnMock) PrepareNeoCalls() []struct {
	Query string
}

PrepareNeoCalls gets all the calls that were made to PrepareNeo. Check the length with:

len(mockedConn.PrepareNeoCalls())

func (*ConnMock) PreparePipeline

func (mock *ConnMock) PreparePipeline(query ...string) (golangNeo4jBoltDriver.PipelineStmt, error)

PreparePipeline calls PreparePipelineFunc.

func (*ConnMock) PreparePipelineCalls

func (mock *ConnMock) PreparePipelineCalls() []struct {
	Query []string
}

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

func (mock *ConnMock) QueryNeoAllCalls() []struct {
	Query  string
	Params map[string]interface{}
}

QueryNeoAllCalls gets all the calls that were made to QueryNeoAll. Check the length with:

len(mockedConn.QueryNeoAllCalls())

func (*ConnMock) QueryNeoCalls

func (mock *ConnMock) QueryNeoCalls() []struct {
	Query  string
	Params map[string]interface{}
}

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

func (mock *ConnMock) SetChunkSize(in1 uint16)

SetChunkSize calls SetChunkSizeFunc.

func (*ConnMock) SetChunkSizeCalls

func (mock *ConnMock) SetChunkSizeCalls() []struct {
	In1 uint16
}

SetChunkSizeCalls gets all the calls that were made to SetChunkSize. Check the length with:

len(mockedConn.SetChunkSizeCalls())

func (*ConnMock) SetTimeout

func (mock *ConnMock) SetTimeout(in1 time.Duration)

SetTimeout calls SetTimeoutFunc.

func (*ConnMock) SetTimeoutCalls

func (mock *ConnMock) SetTimeoutCalls() []struct {
	In1 time.Duration
}

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) Close

func (mock *DBConnectionMock) Close() error

Close calls CloseFunc.

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())

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL