code stringlengths 22 3.95M | docstring stringlengths 20 17.8k | func_name stringlengths 1 472 | language stringclasses 1
value | repo stringlengths 6 57 | path stringlengths 4 226 | url stringlengths 43 277 | license stringclasses 7
values |
|---|---|---|---|---|---|---|---|
func (mmSetName *SpanInterfaceMock) SetNameBeforeCounter() uint64 {
return mm_atomic.LoadUint64(&mmSetName.beforeSetNameCounter)
} | SetNameBeforeCounter returns a count of SpanInterfaceMock.SetName invocations | SetNameBeforeCounter | go | hexdigest/gowrap | templates_tests/span_opencensus_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/span_opencensus_mock_test.go | MIT |
func (mmSetName *mSpanInterfaceMockSetName) Calls() []*SpanInterfaceMockSetNameParams {
mmSetName.mutex.RLock()
argCopy := make([]*SpanInterfaceMockSetNameParams, len(mmSetName.callArgs))
copy(argCopy, mmSetName.callArgs)
mmSetName.mutex.RUnlock()
return argCopy
} | Calls returns a list of arguments used in each call to SpanInterfaceMock.SetName.
The list is in the same order as the calls were made (i.e. recent calls have a higher index) | Calls | go | hexdigest/gowrap | templates_tests/span_opencensus_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/span_opencensus_mock_test.go | MIT |
func (m *SpanInterfaceMock) MinimockSetNameDone() bool {
for _, e := range m.SetNameMock.expectations {
if mm_atomic.LoadUint64(&e.Counter) < 1 {
return false
}
}
// if default expectation was set then invocations count should be greater than zero
if m.SetNameMock.defaultExpectation != nil && mm_atomic.Load... | MinimockSetNameDone returns true if the count of the SetName invocations corresponds
the number of defined expectations | MinimockSetNameDone | go | hexdigest/gowrap | templates_tests/span_opencensus_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/span_opencensus_mock_test.go | MIT |
func (mmSetStatus *mSpanInterfaceMockSetStatus) Expect(status mm_trace.Status) *mSpanInterfaceMockSetStatus {
if mmSetStatus.mock.funcSetStatus != nil {
mmSetStatus.mock.t.Fatalf("SpanInterfaceMock.SetStatus mock is already set by Set")
}
if mmSetStatus.defaultExpectation == nil {
mmSetStatus.defaultExpectation... | Expect sets up expected params for SpanInterface.SetStatus | Expect | go | hexdigest/gowrap | templates_tests/span_opencensus_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/span_opencensus_mock_test.go | MIT |
func (mmSetStatus *mSpanInterfaceMockSetStatus) Inspect(f func(status mm_trace.Status)) *mSpanInterfaceMockSetStatus {
if mmSetStatus.mock.inspectFuncSetStatus != nil {
mmSetStatus.mock.t.Fatalf("Inspect function is already set for SpanInterfaceMock.SetStatus")
}
mmSetStatus.mock.inspectFuncSetStatus = f
return... | Inspect accepts an inspector function that has same arguments as the SpanInterface.SetStatus | Inspect | go | hexdigest/gowrap | templates_tests/span_opencensus_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/span_opencensus_mock_test.go | MIT |
func (mmSetStatus *mSpanInterfaceMockSetStatus) Return() *SpanInterfaceMock {
if mmSetStatus.mock.funcSetStatus != nil {
mmSetStatus.mock.t.Fatalf("SpanInterfaceMock.SetStatus mock is already set by Set")
}
if mmSetStatus.defaultExpectation == nil {
mmSetStatus.defaultExpectation = &SpanInterfaceMockSetStatusEx... | Return sets up results that will be returned by SpanInterface.SetStatus | Return | go | hexdigest/gowrap | templates_tests/span_opencensus_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/span_opencensus_mock_test.go | MIT |
func (mmSetStatus *mSpanInterfaceMockSetStatus) Set(f func(status mm_trace.Status)) *SpanInterfaceMock {
if mmSetStatus.defaultExpectation != nil {
mmSetStatus.mock.t.Fatalf("Default expectation is already set for the SpanInterface.SetStatus method")
}
if len(mmSetStatus.expectations) > 0 {
mmSetStatus.mock.t.F... | Set uses given function f to mock the SpanInterface.SetStatus method | Set | go | hexdigest/gowrap | templates_tests/span_opencensus_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/span_opencensus_mock_test.go | MIT |
func (mmSetStatus *SpanInterfaceMock) SetStatusAfterCounter() uint64 {
return mm_atomic.LoadUint64(&mmSetStatus.afterSetStatusCounter)
} | SetStatusAfterCounter returns a count of finished SpanInterfaceMock.SetStatus invocations | SetStatusAfterCounter | go | hexdigest/gowrap | templates_tests/span_opencensus_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/span_opencensus_mock_test.go | MIT |
func (mmSetStatus *SpanInterfaceMock) SetStatusBeforeCounter() uint64 {
return mm_atomic.LoadUint64(&mmSetStatus.beforeSetStatusCounter)
} | SetStatusBeforeCounter returns a count of SpanInterfaceMock.SetStatus invocations | SetStatusBeforeCounter | go | hexdigest/gowrap | templates_tests/span_opencensus_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/span_opencensus_mock_test.go | MIT |
func (mmSetStatus *mSpanInterfaceMockSetStatus) Calls() []*SpanInterfaceMockSetStatusParams {
mmSetStatus.mutex.RLock()
argCopy := make([]*SpanInterfaceMockSetStatusParams, len(mmSetStatus.callArgs))
copy(argCopy, mmSetStatus.callArgs)
mmSetStatus.mutex.RUnlock()
return argCopy
} | Calls returns a list of arguments used in each call to SpanInterfaceMock.SetStatus.
The list is in the same order as the calls were made (i.e. recent calls have a higher index) | Calls | go | hexdigest/gowrap | templates_tests/span_opencensus_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/span_opencensus_mock_test.go | MIT |
func (m *SpanInterfaceMock) MinimockSetStatusDone() bool {
for _, e := range m.SetStatusMock.expectations {
if mm_atomic.LoadUint64(&e.Counter) < 1 {
return false
}
}
// if default expectation was set then invocations count should be greater than zero
if m.SetStatusMock.defaultExpectation != nil && mm_atomi... | MinimockSetStatusDone returns true if the count of the SetStatus invocations corresponds
the number of defined expectations | MinimockSetStatusDone | go | hexdigest/gowrap | templates_tests/span_opencensus_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/span_opencensus_mock_test.go | MIT |
func (mmSpanContext *mSpanInterfaceMockSpanContext) Expect() *mSpanInterfaceMockSpanContext {
if mmSpanContext.mock.funcSpanContext != nil {
mmSpanContext.mock.t.Fatalf("SpanInterfaceMock.SpanContext mock is already set by Set")
}
if mmSpanContext.defaultExpectation == nil {
mmSpanContext.defaultExpectation = &... | Expect sets up expected params for SpanInterface.SpanContext | Expect | go | hexdigest/gowrap | templates_tests/span_opencensus_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/span_opencensus_mock_test.go | MIT |
func (mmSpanContext *mSpanInterfaceMockSpanContext) Inspect(f func()) *mSpanInterfaceMockSpanContext {
if mmSpanContext.mock.inspectFuncSpanContext != nil {
mmSpanContext.mock.t.Fatalf("Inspect function is already set for SpanInterfaceMock.SpanContext")
}
mmSpanContext.mock.inspectFuncSpanContext = f
return mmS... | Inspect accepts an inspector function that has same arguments as the SpanInterface.SpanContext | Inspect | go | hexdigest/gowrap | templates_tests/span_opencensus_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/span_opencensus_mock_test.go | MIT |
func (mmSpanContext *mSpanInterfaceMockSpanContext) Return(s1 mm_trace.SpanContext) *SpanInterfaceMock {
if mmSpanContext.mock.funcSpanContext != nil {
mmSpanContext.mock.t.Fatalf("SpanInterfaceMock.SpanContext mock is already set by Set")
}
if mmSpanContext.defaultExpectation == nil {
mmSpanContext.defaultExpe... | Return sets up results that will be returned by SpanInterface.SpanContext | Return | go | hexdigest/gowrap | templates_tests/span_opencensus_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/span_opencensus_mock_test.go | MIT |
func (mmSpanContext *mSpanInterfaceMockSpanContext) Set(f func() (s1 mm_trace.SpanContext)) *SpanInterfaceMock {
if mmSpanContext.defaultExpectation != nil {
mmSpanContext.mock.t.Fatalf("Default expectation is already set for the SpanInterface.SpanContext method")
}
if len(mmSpanContext.expectations) > 0 {
mmSp... | Set uses given function f to mock the SpanInterface.SpanContext method | Set | go | hexdigest/gowrap | templates_tests/span_opencensus_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/span_opencensus_mock_test.go | MIT |
func (mmSpanContext *SpanInterfaceMock) SpanContextAfterCounter() uint64 {
return mm_atomic.LoadUint64(&mmSpanContext.afterSpanContextCounter)
} | SpanContextAfterCounter returns a count of finished SpanInterfaceMock.SpanContext invocations | SpanContextAfterCounter | go | hexdigest/gowrap | templates_tests/span_opencensus_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/span_opencensus_mock_test.go | MIT |
func (mmSpanContext *SpanInterfaceMock) SpanContextBeforeCounter() uint64 {
return mm_atomic.LoadUint64(&mmSpanContext.beforeSpanContextCounter)
} | SpanContextBeforeCounter returns a count of SpanInterfaceMock.SpanContext invocations | SpanContextBeforeCounter | go | hexdigest/gowrap | templates_tests/span_opencensus_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/span_opencensus_mock_test.go | MIT |
func (m *SpanInterfaceMock) MinimockSpanContextDone() bool {
for _, e := range m.SpanContextMock.expectations {
if mm_atomic.LoadUint64(&e.Counter) < 1 {
return false
}
}
// if default expectation was set then invocations count should be greater than zero
if m.SpanContextMock.defaultExpectation != nil && mm... | MinimockSpanContextDone returns true if the count of the SpanContext invocations corresponds
the number of defined expectations | MinimockSpanContextDone | go | hexdigest/gowrap | templates_tests/span_opencensus_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/span_opencensus_mock_test.go | MIT |
func (mmString *mSpanInterfaceMockString) Expect() *mSpanInterfaceMockString {
if mmString.mock.funcString != nil {
mmString.mock.t.Fatalf("SpanInterfaceMock.String mock is already set by Set")
}
if mmString.defaultExpectation == nil {
mmString.defaultExpectation = &SpanInterfaceMockStringExpectation{}
}
ret... | Expect sets up expected params for SpanInterface.String | Expect | go | hexdigest/gowrap | templates_tests/span_opencensus_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/span_opencensus_mock_test.go | MIT |
func (mmString *mSpanInterfaceMockString) Inspect(f func()) *mSpanInterfaceMockString {
if mmString.mock.inspectFuncString != nil {
mmString.mock.t.Fatalf("Inspect function is already set for SpanInterfaceMock.String")
}
mmString.mock.inspectFuncString = f
return mmString
} | Inspect accepts an inspector function that has same arguments as the SpanInterface.String | Inspect | go | hexdigest/gowrap | templates_tests/span_opencensus_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/span_opencensus_mock_test.go | MIT |
func (mmString *mSpanInterfaceMockString) Return(s1 string) *SpanInterfaceMock {
if mmString.mock.funcString != nil {
mmString.mock.t.Fatalf("SpanInterfaceMock.String mock is already set by Set")
}
if mmString.defaultExpectation == nil {
mmString.defaultExpectation = &SpanInterfaceMockStringExpectation{mock: mm... | Return sets up results that will be returned by SpanInterface.String | Return | go | hexdigest/gowrap | templates_tests/span_opencensus_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/span_opencensus_mock_test.go | MIT |
func (mmString *mSpanInterfaceMockString) Set(f func() (s1 string)) *SpanInterfaceMock {
if mmString.defaultExpectation != nil {
mmString.mock.t.Fatalf("Default expectation is already set for the SpanInterface.String method")
}
if len(mmString.expectations) > 0 {
mmString.mock.t.Fatalf("Some expectations are al... | Set uses given function f to mock the SpanInterface.String method | Set | go | hexdigest/gowrap | templates_tests/span_opencensus_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/span_opencensus_mock_test.go | MIT |
func (mmString *SpanInterfaceMock) StringAfterCounter() uint64 {
return mm_atomic.LoadUint64(&mmString.afterStringCounter)
} | StringAfterCounter returns a count of finished SpanInterfaceMock.String invocations | StringAfterCounter | go | hexdigest/gowrap | templates_tests/span_opencensus_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/span_opencensus_mock_test.go | MIT |
func (mmString *SpanInterfaceMock) StringBeforeCounter() uint64 {
return mm_atomic.LoadUint64(&mmString.beforeStringCounter)
} | StringBeforeCounter returns a count of SpanInterfaceMock.String invocations | StringBeforeCounter | go | hexdigest/gowrap | templates_tests/span_opencensus_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/span_opencensus_mock_test.go | MIT |
func (m *SpanInterfaceMock) MinimockStringDone() bool {
for _, e := range m.StringMock.expectations {
if mm_atomic.LoadUint64(&e.Counter) < 1 {
return false
}
}
// if default expectation was set then invocations count should be greater than zero
if m.StringMock.defaultExpectation != nil && mm_atomic.LoadUin... | MinimockStringDone returns true if the count of the String invocations corresponds
the number of defined expectations | MinimockStringDone | go | hexdigest/gowrap | templates_tests/span_opencensus_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/span_opencensus_mock_test.go | MIT |
func (m *SpanInterfaceMock) MinimockFinish() {
if !m.minimockDone() {
m.MinimockAddAttributesInspect()
m.MinimockAddLinkInspect()
m.MinimockAddMessageReceiveEventInspect()
m.MinimockAddMessageSendEventInspect()
m.MinimockAnnotateInspect()
m.MinimockAnnotatefInspect()
m.MinimockEndInspect()
m.Min... | MinimockFinish checks that all mocked methods have been called the expected number of times | MinimockFinish | go | hexdigest/gowrap | templates_tests/span_opencensus_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/span_opencensus_mock_test.go | MIT |
func (m *SpanInterfaceMock) MinimockWait(timeout mm_time.Duration) {
timeoutCh := mm_time.After(timeout)
for {
if m.minimockDone() {
return
}
select {
case <-timeoutCh:
m.MinimockFinish()
return
case <-mm_time.After(10 * mm_time.Millisecond):
}
}
} | MinimockWait waits for all mocked methods to be called the expected number of times | MinimockWait | go | hexdigest/gowrap | templates_tests/span_opencensus_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/span_opencensus_mock_test.go | MIT |
func NewTracerMock(t minimock.Tester) *TracerMock {
m := &TracerMock{t: t}
if controller, ok := t.(minimock.MockController); ok {
controller.RegisterMocker(m)
}
m.ExtractMock = mTracerMockExtract{mock: m}
m.InjectMock = mTracerMockInject{mock: m}
m.StartSpanMock = mTracerMockStartSpan{mock: m}
return m
} | NewTracerMock returns a mock for github.com/opentracing/opentracing-go.Tracer | NewTracerMock | go | hexdigest/gowrap | templates_tests/tracer_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/tracer_mock_test.go | MIT |
func (m *mTracerMockExtract) Expect(p interface{}, p1 interface{}) *mTracerMockExtract {
m.mockExpectations = &TracerMockExtractParams{p, p1}
return m
} | Expect sets up expected params for the Tracer.Extract | Expect | go | hexdigest/gowrap | templates_tests/tracer_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/tracer_mock_test.go | MIT |
func (m *mTracerMockExtract) Return(r opentracing.SpanContext, r1 error) *TracerMock {
m.mock.ExtractFunc = func(p interface{}, p1 interface{}) (opentracing.SpanContext, error) {
return r, r1
}
return m.mock
} | Return sets up a mock for Tracer.Extract to return Return's arguments | Return | go | hexdigest/gowrap | templates_tests/tracer_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/tracer_mock_test.go | MIT |
func (m *mTracerMockExtract) Set(f func(p interface{}, p1 interface{}) (r opentracing.SpanContext, r1 error)) *TracerMock {
m.mock.ExtractFunc = f
return m.mock
} | Set uses given function f as a mock of Tracer.Extract method | Set | go | hexdigest/gowrap | templates_tests/tracer_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/tracer_mock_test.go | MIT |
func (m *TracerMock) Extract(p interface{}, p1 interface{}) (r opentracing.SpanContext, r1 error) {
atomic.AddUint64(&m.ExtractPreCounter, 1)
defer atomic.AddUint64(&m.ExtractCounter, 1)
if m.ExtractMock.mockExpectations != nil {
testify_assert.Equal(m.t, *m.ExtractMock.mockExpectations, TracerMockExtractParams{p... | Extract implements github.com/opentracing/opentracing-go.Tracer interface | Extract | go | hexdigest/gowrap | templates_tests/tracer_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/tracer_mock_test.go | MIT |
func (m *TracerMock) ExtractMinimockCounter() uint64 {
return atomic.LoadUint64(&m.ExtractCounter)
} | ExtractMinimockCounter returns a count of TracerMock.ExtractFunc invocations | ExtractMinimockCounter | go | hexdigest/gowrap | templates_tests/tracer_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/tracer_mock_test.go | MIT |
func (m *TracerMock) ExtractMinimockPreCounter() uint64 {
return atomic.LoadUint64(&m.ExtractPreCounter)
} | ExtractMinimockPreCounter returns the value of TracerMock.Extract invocations | ExtractMinimockPreCounter | go | hexdigest/gowrap | templates_tests/tracer_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/tracer_mock_test.go | MIT |
func (m *mTracerMockInject) Expect(p opentracing.SpanContext, p1 interface{}, p2 interface{}) *mTracerMockInject {
m.mockExpectations = &TracerMockInjectParams{p, p1, p2}
return m
} | Expect sets up expected params for the Tracer.Inject | Expect | go | hexdigest/gowrap | templates_tests/tracer_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/tracer_mock_test.go | MIT |
func (m *mTracerMockInject) Return(r error) *TracerMock {
m.mock.InjectFunc = func(p opentracing.SpanContext, p1 interface{}, p2 interface{}) error {
return r
}
return m.mock
} | Return sets up a mock for Tracer.Inject to return Return's arguments | Return | go | hexdigest/gowrap | templates_tests/tracer_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/tracer_mock_test.go | MIT |
func (m *mTracerMockInject) Set(f func(p opentracing.SpanContext, p1 interface{}, p2 interface{}) (r error)) *TracerMock {
m.mock.InjectFunc = f
return m.mock
} | Set uses given function f as a mock of Tracer.Inject method | Set | go | hexdigest/gowrap | templates_tests/tracer_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/tracer_mock_test.go | MIT |
func (m *TracerMock) Inject(p opentracing.SpanContext, p1 interface{}, p2 interface{}) (r error) {
atomic.AddUint64(&m.InjectPreCounter, 1)
defer atomic.AddUint64(&m.InjectCounter, 1)
if m.InjectMock.mockExpectations != nil {
testify_assert.Equal(m.t, *m.InjectMock.mockExpectations, TracerMockInjectParams{p, p1, ... | Inject implements github.com/opentracing/opentracing-go.Tracer interface | Inject | go | hexdigest/gowrap | templates_tests/tracer_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/tracer_mock_test.go | MIT |
func (m *TracerMock) InjectMinimockCounter() uint64 {
return atomic.LoadUint64(&m.InjectCounter)
} | InjectMinimockCounter returns a count of TracerMock.InjectFunc invocations | InjectMinimockCounter | go | hexdigest/gowrap | templates_tests/tracer_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/tracer_mock_test.go | MIT |
func (m *TracerMock) InjectMinimockPreCounter() uint64 {
return atomic.LoadUint64(&m.InjectPreCounter)
} | InjectMinimockPreCounter returns the value of TracerMock.Inject invocations | InjectMinimockPreCounter | go | hexdigest/gowrap | templates_tests/tracer_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/tracer_mock_test.go | MIT |
func (m *mTracerMockStartSpan) Expect(p string, p1 ...opentracing.StartSpanOption) *mTracerMockStartSpan {
m.mockExpectations = &TracerMockStartSpanParams{p, p1}
return m
} | Expect sets up expected params for the Tracer.StartSpan | Expect | go | hexdigest/gowrap | templates_tests/tracer_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/tracer_mock_test.go | MIT |
func (m *mTracerMockStartSpan) Return(r opentracing.Span) *TracerMock {
m.mock.StartSpanFunc = func(p string, p1 ...opentracing.StartSpanOption) opentracing.Span {
return r
}
return m.mock
} | Return sets up a mock for Tracer.StartSpan to return Return's arguments | Return | go | hexdigest/gowrap | templates_tests/tracer_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/tracer_mock_test.go | MIT |
func (m *mTracerMockStartSpan) Set(f func(p string, p1 ...opentracing.StartSpanOption) (r opentracing.Span)) *TracerMock {
m.mock.StartSpanFunc = f
return m.mock
} | Set uses given function f as a mock of Tracer.StartSpan method | Set | go | hexdigest/gowrap | templates_tests/tracer_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/tracer_mock_test.go | MIT |
func (m *TracerMock) StartSpan(p string, p1 ...opentracing.StartSpanOption) (r opentracing.Span) {
atomic.AddUint64(&m.StartSpanPreCounter, 1)
defer atomic.AddUint64(&m.StartSpanCounter, 1)
if m.StartSpanMock.mockExpectations != nil {
testify_assert.Equal(m.t, *m.StartSpanMock.mockExpectations, TracerMockStartSpa... | StartSpan implements github.com/opentracing/opentracing-go.Tracer interface | StartSpan | go | hexdigest/gowrap | templates_tests/tracer_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/tracer_mock_test.go | MIT |
func (m *TracerMock) StartSpanMinimockCounter() uint64 {
return atomic.LoadUint64(&m.StartSpanCounter)
} | StartSpanMinimockCounter returns a count of TracerMock.StartSpanFunc invocations | StartSpanMinimockCounter | go | hexdigest/gowrap | templates_tests/tracer_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/tracer_mock_test.go | MIT |
func (m *TracerMock) StartSpanMinimockPreCounter() uint64 {
return atomic.LoadUint64(&m.StartSpanPreCounter)
} | StartSpanMinimockPreCounter returns the value of TracerMock.StartSpan invocations | StartSpanMinimockPreCounter | go | hexdigest/gowrap | templates_tests/tracer_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/tracer_mock_test.go | MIT |
func (m *TracerMock) ValidateCallCounters() {
if m.ExtractFunc != nil && atomic.LoadUint64(&m.ExtractCounter) == 0 {
m.t.Fatal("Expected call to TracerMock.Extract")
}
if m.InjectFunc != nil && atomic.LoadUint64(&m.InjectCounter) == 0 {
m.t.Fatal("Expected call to TracerMock.Inject")
}
if m.StartSpanFunc !=... | ValidateCallCounters checks that all mocked methods of the interface have been called at least once
Deprecated: please use MinimockFinish method or use Finish method of minimock.Controller | ValidateCallCounters | go | hexdigest/gowrap | templates_tests/tracer_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/tracer_mock_test.go | MIT |
func (m *TracerMock) MinimockFinish() {
if m.ExtractFunc != nil && atomic.LoadUint64(&m.ExtractCounter) == 0 {
m.t.Fatal("Expected call to TracerMock.Extract")
}
if m.InjectFunc != nil && atomic.LoadUint64(&m.InjectCounter) == 0 {
m.t.Fatal("Expected call to TracerMock.Inject")
}
if m.StartSpanFunc != nil &... | MinimockFinish checks that all mocked methods of the interface have been called at least once | MinimockFinish | go | hexdigest/gowrap | templates_tests/tracer_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/tracer_mock_test.go | MIT |
func (m *TracerMock) MinimockWait(timeout time.Duration) {
timeoutCh := time.After(timeout)
for {
ok := true
ok = ok && (m.ExtractFunc == nil || atomic.LoadUint64(&m.ExtractCounter) > 0)
ok = ok && (m.InjectFunc == nil || atomic.LoadUint64(&m.InjectCounter) > 0)
ok = ok && (m.StartSpanFunc == nil || atomic.Lo... | MinimockWait waits for all mocked methods to be called at least once
this method is called by minimock.Controller | MinimockWait | go | hexdigest/gowrap | templates_tests/tracer_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/tracer_mock_test.go | MIT |
func (m *TracerMock) AllMocksCalled() bool {
if m.ExtractFunc != nil && atomic.LoadUint64(&m.ExtractCounter) == 0 {
return false
}
if m.InjectFunc != nil && atomic.LoadUint64(&m.InjectCounter) == 0 {
return false
}
if m.StartSpanFunc != nil && atomic.LoadUint64(&m.StartSpanCounter) == 0 {
return false
}
... | AllMocksCalled returns true if all mocked methods were called before the execution of AllMocksCalled,
it can be used with assert/require, i.e. assert.True(mock.AllMocksCalled()) | AllMocksCalled | go | hexdigest/gowrap | templates_tests/tracer_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/tracer_mock_test.go | MIT |
func NewTracerOpenCensusMock(t minimock.Tester) *TracerOpenCensusMock {
m := &TracerOpenCensusMock{t: t}
if controller, ok := t.(minimock.MockController); ok {
controller.RegisterMocker(m)
}
m.FromContextMock = mTracerOpenCensusMockFromContext{mock: m}
m.FromContextMock.callArgs = []*TracerOpenCensusMockFromCon... | NewTracerOpenCensusMock returns a mock for trace.Tracer | NewTracerOpenCensusMock | go | hexdigest/gowrap | templates_tests/tracer_opencensus_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/tracer_opencensus_mock_test.go | MIT |
func (mmFromContext *mTracerOpenCensusMockFromContext) Expect(ctx context.Context) *mTracerOpenCensusMockFromContext {
if mmFromContext.mock.funcFromContext != nil {
mmFromContext.mock.t.Fatalf("TracerOpenCensusMock.FromContext mock is already set by Set")
}
if mmFromContext.defaultExpectation == nil {
mmFromCo... | Expect sets up expected params for Tracer.FromContext | Expect | go | hexdigest/gowrap | templates_tests/tracer_opencensus_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/tracer_opencensus_mock_test.go | MIT |
func (mmFromContext *mTracerOpenCensusMockFromContext) Inspect(f func(ctx context.Context)) *mTracerOpenCensusMockFromContext {
if mmFromContext.mock.inspectFuncFromContext != nil {
mmFromContext.mock.t.Fatalf("Inspect function is already set for TracerOpenCensusMock.FromContext")
}
mmFromContext.mock.inspectFunc... | Inspect accepts an inspector function that has same arguments as the Tracer.FromContext | Inspect | go | hexdigest/gowrap | templates_tests/tracer_opencensus_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/tracer_opencensus_mock_test.go | MIT |
func (mmFromContext *mTracerOpenCensusMockFromContext) Return(sp1 *mm_trace.Span) *TracerOpenCensusMock {
if mmFromContext.mock.funcFromContext != nil {
mmFromContext.mock.t.Fatalf("TracerOpenCensusMock.FromContext mock is already set by Set")
}
if mmFromContext.defaultExpectation == nil {
mmFromContext.default... | Return sets up results that will be returned by Tracer.FromContext | Return | go | hexdigest/gowrap | templates_tests/tracer_opencensus_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/tracer_opencensus_mock_test.go | MIT |
func (mmFromContext *mTracerOpenCensusMockFromContext) Set(f func(ctx context.Context) (sp1 *mm_trace.Span)) *TracerOpenCensusMock {
if mmFromContext.defaultExpectation != nil {
mmFromContext.mock.t.Fatalf("Default expectation is already set for the Tracer.FromContext method")
}
if len(mmFromContext.expectations)... | Set uses given function f to mock the Tracer.FromContext method | Set | go | hexdigest/gowrap | templates_tests/tracer_opencensus_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/tracer_opencensus_mock_test.go | MIT |
func (mmFromContext *mTracerOpenCensusMockFromContext) When(ctx context.Context) *TracerOpenCensusMockFromContextExpectation {
if mmFromContext.mock.funcFromContext != nil {
mmFromContext.mock.t.Fatalf("TracerOpenCensusMock.FromContext mock is already set by Set")
}
expectation := &TracerOpenCensusMockFromContext... | When sets expectation for the Tracer.FromContext which will trigger the result defined by the following
Then helper | When | go | hexdigest/gowrap | templates_tests/tracer_opencensus_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/tracer_opencensus_mock_test.go | MIT |
func (e *TracerOpenCensusMockFromContextExpectation) Then(sp1 *mm_trace.Span) *TracerOpenCensusMock {
e.results = &TracerOpenCensusMockFromContextResults{sp1}
return e.mock
} | Then sets up Tracer.FromContext return parameters for the expectation previously defined by the When method | Then | go | hexdigest/gowrap | templates_tests/tracer_opencensus_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/tracer_opencensus_mock_test.go | MIT |
func (mmFromContext *TracerOpenCensusMock) FromContextAfterCounter() uint64 {
return mm_atomic.LoadUint64(&mmFromContext.afterFromContextCounter)
} | FromContextAfterCounter returns a count of finished TracerOpenCensusMock.FromContext invocations | FromContextAfterCounter | go | hexdigest/gowrap | templates_tests/tracer_opencensus_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/tracer_opencensus_mock_test.go | MIT |
func (mmFromContext *TracerOpenCensusMock) FromContextBeforeCounter() uint64 {
return mm_atomic.LoadUint64(&mmFromContext.beforeFromContextCounter)
} | FromContextBeforeCounter returns a count of TracerOpenCensusMock.FromContext invocations | FromContextBeforeCounter | go | hexdigest/gowrap | templates_tests/tracer_opencensus_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/tracer_opencensus_mock_test.go | MIT |
func (mmFromContext *mTracerOpenCensusMockFromContext) Calls() []*TracerOpenCensusMockFromContextParams {
mmFromContext.mutex.RLock()
argCopy := make([]*TracerOpenCensusMockFromContextParams, len(mmFromContext.callArgs))
copy(argCopy, mmFromContext.callArgs)
mmFromContext.mutex.RUnlock()
return argCopy
} | Calls returns a list of arguments used in each call to TracerOpenCensusMock.FromContext.
The list is in the same order as the calls were made (i.e. recent calls have a higher index) | Calls | go | hexdigest/gowrap | templates_tests/tracer_opencensus_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/tracer_opencensus_mock_test.go | MIT |
func (m *TracerOpenCensusMock) MinimockFromContextDone() bool {
for _, e := range m.FromContextMock.expectations {
if mm_atomic.LoadUint64(&e.Counter) < 1 {
return false
}
}
// if default expectation was set then invocations count should be greater than zero
if m.FromContextMock.defaultExpectation != nil &&... | MinimockFromContextDone returns true if the count of the FromContext invocations corresponds
the number of defined expectations | MinimockFromContextDone | go | hexdigest/gowrap | templates_tests/tracer_opencensus_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/tracer_opencensus_mock_test.go | MIT |
func (mmNewContext *mTracerOpenCensusMockNewContext) Expect(ctx context.Context, s *mm_trace.Span) *mTracerOpenCensusMockNewContext {
if mmNewContext.mock.funcNewContext != nil {
mmNewContext.mock.t.Fatalf("TracerOpenCensusMock.NewContext mock is already set by Set")
}
if mmNewContext.defaultExpectation == nil {
... | Expect sets up expected params for Tracer.NewContext | Expect | go | hexdigest/gowrap | templates_tests/tracer_opencensus_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/tracer_opencensus_mock_test.go | MIT |
func (mmNewContext *mTracerOpenCensusMockNewContext) Inspect(f func(ctx context.Context, s *mm_trace.Span)) *mTracerOpenCensusMockNewContext {
if mmNewContext.mock.inspectFuncNewContext != nil {
mmNewContext.mock.t.Fatalf("Inspect function is already set for TracerOpenCensusMock.NewContext")
}
mmNewContext.mock.i... | Inspect accepts an inspector function that has same arguments as the Tracer.NewContext | Inspect | go | hexdigest/gowrap | templates_tests/tracer_opencensus_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/tracer_opencensus_mock_test.go | MIT |
func (mmNewContext *mTracerOpenCensusMockNewContext) Return(c1 context.Context) *TracerOpenCensusMock {
if mmNewContext.mock.funcNewContext != nil {
mmNewContext.mock.t.Fatalf("TracerOpenCensusMock.NewContext mock is already set by Set")
}
if mmNewContext.defaultExpectation == nil {
mmNewContext.defaultExpectat... | Return sets up results that will be returned by Tracer.NewContext | Return | go | hexdigest/gowrap | templates_tests/tracer_opencensus_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/tracer_opencensus_mock_test.go | MIT |
func (mmNewContext *mTracerOpenCensusMockNewContext) Set(f func(ctx context.Context, s *mm_trace.Span) (c1 context.Context)) *TracerOpenCensusMock {
if mmNewContext.defaultExpectation != nil {
mmNewContext.mock.t.Fatalf("Default expectation is already set for the Tracer.NewContext method")
}
if len(mmNewContext.e... | Set uses given function f to mock the Tracer.NewContext method | Set | go | hexdigest/gowrap | templates_tests/tracer_opencensus_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/tracer_opencensus_mock_test.go | MIT |
func (mmNewContext *mTracerOpenCensusMockNewContext) When(ctx context.Context, s *mm_trace.Span) *TracerOpenCensusMockNewContextExpectation {
if mmNewContext.mock.funcNewContext != nil {
mmNewContext.mock.t.Fatalf("TracerOpenCensusMock.NewContext mock is already set by Set")
}
expectation := &TracerOpenCensusMock... | When sets expectation for the Tracer.NewContext which will trigger the result defined by the following
Then helper | When | go | hexdigest/gowrap | templates_tests/tracer_opencensus_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/tracer_opencensus_mock_test.go | MIT |
func (e *TracerOpenCensusMockNewContextExpectation) Then(c1 context.Context) *TracerOpenCensusMock {
e.results = &TracerOpenCensusMockNewContextResults{c1}
return e.mock
} | Then sets up Tracer.NewContext return parameters for the expectation previously defined by the When method | Then | go | hexdigest/gowrap | templates_tests/tracer_opencensus_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/tracer_opencensus_mock_test.go | MIT |
func (mmNewContext *TracerOpenCensusMock) NewContextAfterCounter() uint64 {
return mm_atomic.LoadUint64(&mmNewContext.afterNewContextCounter)
} | NewContextAfterCounter returns a count of finished TracerOpenCensusMock.NewContext invocations | NewContextAfterCounter | go | hexdigest/gowrap | templates_tests/tracer_opencensus_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/tracer_opencensus_mock_test.go | MIT |
func (mmNewContext *TracerOpenCensusMock) NewContextBeforeCounter() uint64 {
return mm_atomic.LoadUint64(&mmNewContext.beforeNewContextCounter)
} | NewContextBeforeCounter returns a count of TracerOpenCensusMock.NewContext invocations | NewContextBeforeCounter | go | hexdigest/gowrap | templates_tests/tracer_opencensus_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/tracer_opencensus_mock_test.go | MIT |
func (mmNewContext *mTracerOpenCensusMockNewContext) Calls() []*TracerOpenCensusMockNewContextParams {
mmNewContext.mutex.RLock()
argCopy := make([]*TracerOpenCensusMockNewContextParams, len(mmNewContext.callArgs))
copy(argCopy, mmNewContext.callArgs)
mmNewContext.mutex.RUnlock()
return argCopy
} | Calls returns a list of arguments used in each call to TracerOpenCensusMock.NewContext.
The list is in the same order as the calls were made (i.e. recent calls have a higher index) | Calls | go | hexdigest/gowrap | templates_tests/tracer_opencensus_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/tracer_opencensus_mock_test.go | MIT |
func (m *TracerOpenCensusMock) MinimockNewContextDone() bool {
for _, e := range m.NewContextMock.expectations {
if mm_atomic.LoadUint64(&e.Counter) < 1 {
return false
}
}
// if default expectation was set then invocations count should be greater than zero
if m.NewContextMock.defaultExpectation != nil && mm... | MinimockNewContextDone returns true if the count of the NewContext invocations corresponds
the number of defined expectations | MinimockNewContextDone | go | hexdigest/gowrap | templates_tests/tracer_opencensus_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/tracer_opencensus_mock_test.go | MIT |
func (mmStartSpan *mTracerOpenCensusMockStartSpan) Expect(ctx context.Context, name string, o ...mm_trace.StartOption) *mTracerOpenCensusMockStartSpan {
if mmStartSpan.mock.funcStartSpan != nil {
mmStartSpan.mock.t.Fatalf("TracerOpenCensusMock.StartSpan mock is already set by Set")
}
if mmStartSpan.defaultExpecta... | Expect sets up expected params for Tracer.StartSpan | Expect | go | hexdigest/gowrap | templates_tests/tracer_opencensus_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/tracer_opencensus_mock_test.go | MIT |
func (mmStartSpan *mTracerOpenCensusMockStartSpan) Inspect(f func(ctx context.Context, name string, o ...mm_trace.StartOption)) *mTracerOpenCensusMockStartSpan {
if mmStartSpan.mock.inspectFuncStartSpan != nil {
mmStartSpan.mock.t.Fatalf("Inspect function is already set for TracerOpenCensusMock.StartSpan")
}
mmSt... | Inspect accepts an inspector function that has same arguments as the Tracer.StartSpan | Inspect | go | hexdigest/gowrap | templates_tests/tracer_opencensus_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/tracer_opencensus_mock_test.go | MIT |
func (mmStartSpan *mTracerOpenCensusMockStartSpan) Return(c2 context.Context, sp1 *mm_trace.Span) *TracerOpenCensusMock {
if mmStartSpan.mock.funcStartSpan != nil {
mmStartSpan.mock.t.Fatalf("TracerOpenCensusMock.StartSpan mock is already set by Set")
}
if mmStartSpan.defaultExpectation == nil {
mmStartSpan.def... | Return sets up results that will be returned by Tracer.StartSpan | Return | go | hexdigest/gowrap | templates_tests/tracer_opencensus_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/tracer_opencensus_mock_test.go | MIT |
func (mmStartSpan *mTracerOpenCensusMockStartSpan) Set(f func(ctx context.Context, name string, o ...mm_trace.StartOption) (c2 context.Context, sp1 *mm_trace.Span)) *TracerOpenCensusMock {
if mmStartSpan.defaultExpectation != nil {
mmStartSpan.mock.t.Fatalf("Default expectation is already set for the Tracer.StartSpa... | Set uses given function f to mock the Tracer.StartSpan method | Set | go | hexdigest/gowrap | templates_tests/tracer_opencensus_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/tracer_opencensus_mock_test.go | MIT |
func (mmStartSpan *mTracerOpenCensusMockStartSpan) When(ctx context.Context, name string, o ...mm_trace.StartOption) *TracerOpenCensusMockStartSpanExpectation {
if mmStartSpan.mock.funcStartSpan != nil {
mmStartSpan.mock.t.Fatalf("TracerOpenCensusMock.StartSpan mock is already set by Set")
}
expectation := &Trace... | When sets expectation for the Tracer.StartSpan which will trigger the result defined by the following
Then helper | When | go | hexdigest/gowrap | templates_tests/tracer_opencensus_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/tracer_opencensus_mock_test.go | MIT |
func (e *TracerOpenCensusMockStartSpanExpectation) Then(c2 context.Context, sp1 *mm_trace.Span) *TracerOpenCensusMock {
e.results = &TracerOpenCensusMockStartSpanResults{c2, sp1}
return e.mock
} | Then sets up Tracer.StartSpan return parameters for the expectation previously defined by the When method | Then | go | hexdigest/gowrap | templates_tests/tracer_opencensus_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/tracer_opencensus_mock_test.go | MIT |
func (mmStartSpan *TracerOpenCensusMock) StartSpanAfterCounter() uint64 {
return mm_atomic.LoadUint64(&mmStartSpan.afterStartSpanCounter)
} | StartSpanAfterCounter returns a count of finished TracerOpenCensusMock.StartSpan invocations | StartSpanAfterCounter | go | hexdigest/gowrap | templates_tests/tracer_opencensus_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/tracer_opencensus_mock_test.go | MIT |
func (mmStartSpan *TracerOpenCensusMock) StartSpanBeforeCounter() uint64 {
return mm_atomic.LoadUint64(&mmStartSpan.beforeStartSpanCounter)
} | StartSpanBeforeCounter returns a count of TracerOpenCensusMock.StartSpan invocations | StartSpanBeforeCounter | go | hexdigest/gowrap | templates_tests/tracer_opencensus_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/tracer_opencensus_mock_test.go | MIT |
func (mmStartSpan *mTracerOpenCensusMockStartSpan) Calls() []*TracerOpenCensusMockStartSpanParams {
mmStartSpan.mutex.RLock()
argCopy := make([]*TracerOpenCensusMockStartSpanParams, len(mmStartSpan.callArgs))
copy(argCopy, mmStartSpan.callArgs)
mmStartSpan.mutex.RUnlock()
return argCopy
} | Calls returns a list of arguments used in each call to TracerOpenCensusMock.StartSpan.
The list is in the same order as the calls were made (i.e. recent calls have a higher index) | Calls | go | hexdigest/gowrap | templates_tests/tracer_opencensus_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/tracer_opencensus_mock_test.go | MIT |
func (m *TracerOpenCensusMock) MinimockStartSpanDone() bool {
for _, e := range m.StartSpanMock.expectations {
if mm_atomic.LoadUint64(&e.Counter) < 1 {
return false
}
}
// if default expectation was set then invocations count should be greater than zero
if m.StartSpanMock.defaultExpectation != nil && mm_at... | MinimockStartSpanDone returns true if the count of the StartSpan invocations corresponds
the number of defined expectations | MinimockStartSpanDone | go | hexdigest/gowrap | templates_tests/tracer_opencensus_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/tracer_opencensus_mock_test.go | MIT |
func (mmStartSpanWithRemoteParent *mTracerOpenCensusMockStartSpanWithRemoteParent) Expect(ctx context.Context, name string, parent mm_trace.SpanContext, o ...mm_trace.StartOption) *mTracerOpenCensusMockStartSpanWithRemoteParent {
if mmStartSpanWithRemoteParent.mock.funcStartSpanWithRemoteParent != nil {
mmStartSpanW... | Expect sets up expected params for Tracer.StartSpanWithRemoteParent | Expect | go | hexdigest/gowrap | templates_tests/tracer_opencensus_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/tracer_opencensus_mock_test.go | MIT |
func (mmStartSpanWithRemoteParent *mTracerOpenCensusMockStartSpanWithRemoteParent) Inspect(f func(ctx context.Context, name string, parent mm_trace.SpanContext, o ...mm_trace.StartOption)) *mTracerOpenCensusMockStartSpanWithRemoteParent {
if mmStartSpanWithRemoteParent.mock.inspectFuncStartSpanWithRemoteParent != nil ... | Inspect accepts an inspector function that has same arguments as the Tracer.StartSpanWithRemoteParent | Inspect | go | hexdigest/gowrap | templates_tests/tracer_opencensus_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/tracer_opencensus_mock_test.go | MIT |
func (mmStartSpanWithRemoteParent *mTracerOpenCensusMockStartSpanWithRemoteParent) Return(c2 context.Context, sp1 *mm_trace.Span) *TracerOpenCensusMock {
if mmStartSpanWithRemoteParent.mock.funcStartSpanWithRemoteParent != nil {
mmStartSpanWithRemoteParent.mock.t.Fatalf("TracerOpenCensusMock.StartSpanWithRemoteParen... | Return sets up results that will be returned by Tracer.StartSpanWithRemoteParent | Return | go | hexdigest/gowrap | templates_tests/tracer_opencensus_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/tracer_opencensus_mock_test.go | MIT |
func (mmStartSpanWithRemoteParent *mTracerOpenCensusMockStartSpanWithRemoteParent) Set(f func(ctx context.Context, name string, parent mm_trace.SpanContext, o ...mm_trace.StartOption) (c2 context.Context, sp1 *mm_trace.Span)) *TracerOpenCensusMock {
if mmStartSpanWithRemoteParent.defaultExpectation != nil {
mmStartS... | Set uses given function f to mock the Tracer.StartSpanWithRemoteParent method | Set | go | hexdigest/gowrap | templates_tests/tracer_opencensus_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/tracer_opencensus_mock_test.go | MIT |
func (mmStartSpanWithRemoteParent *mTracerOpenCensusMockStartSpanWithRemoteParent) When(ctx context.Context, name string, parent mm_trace.SpanContext, o ...mm_trace.StartOption) *TracerOpenCensusMockStartSpanWithRemoteParentExpectation {
if mmStartSpanWithRemoteParent.mock.funcStartSpanWithRemoteParent != nil {
mmSt... | When sets expectation for the Tracer.StartSpanWithRemoteParent which will trigger the result defined by the following
Then helper | When | go | hexdigest/gowrap | templates_tests/tracer_opencensus_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/tracer_opencensus_mock_test.go | MIT |
func (e *TracerOpenCensusMockStartSpanWithRemoteParentExpectation) Then(c2 context.Context, sp1 *mm_trace.Span) *TracerOpenCensusMock {
e.results = &TracerOpenCensusMockStartSpanWithRemoteParentResults{c2, sp1}
return e.mock
} | Then sets up Tracer.StartSpanWithRemoteParent return parameters for the expectation previously defined by the When method | Then | go | hexdigest/gowrap | templates_tests/tracer_opencensus_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/tracer_opencensus_mock_test.go | MIT |
func (mmStartSpanWithRemoteParent *TracerOpenCensusMock) StartSpanWithRemoteParentAfterCounter() uint64 {
return mm_atomic.LoadUint64(&mmStartSpanWithRemoteParent.afterStartSpanWithRemoteParentCounter)
} | StartSpanWithRemoteParentAfterCounter returns a count of finished TracerOpenCensusMock.StartSpanWithRemoteParent invocations | StartSpanWithRemoteParentAfterCounter | go | hexdigest/gowrap | templates_tests/tracer_opencensus_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/tracer_opencensus_mock_test.go | MIT |
func (mmStartSpanWithRemoteParent *TracerOpenCensusMock) StartSpanWithRemoteParentBeforeCounter() uint64 {
return mm_atomic.LoadUint64(&mmStartSpanWithRemoteParent.beforeStartSpanWithRemoteParentCounter)
} | StartSpanWithRemoteParentBeforeCounter returns a count of TracerOpenCensusMock.StartSpanWithRemoteParent invocations | StartSpanWithRemoteParentBeforeCounter | go | hexdigest/gowrap | templates_tests/tracer_opencensus_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/tracer_opencensus_mock_test.go | MIT |
func (mmStartSpanWithRemoteParent *mTracerOpenCensusMockStartSpanWithRemoteParent) Calls() []*TracerOpenCensusMockStartSpanWithRemoteParentParams {
mmStartSpanWithRemoteParent.mutex.RLock()
argCopy := make([]*TracerOpenCensusMockStartSpanWithRemoteParentParams, len(mmStartSpanWithRemoteParent.callArgs))
copy(argCop... | Calls returns a list of arguments used in each call to TracerOpenCensusMock.StartSpanWithRemoteParent.
The list is in the same order as the calls were made (i.e. recent calls have a higher index) | Calls | go | hexdigest/gowrap | templates_tests/tracer_opencensus_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/tracer_opencensus_mock_test.go | MIT |
func (m *TracerOpenCensusMock) MinimockStartSpanWithRemoteParentDone() bool {
for _, e := range m.StartSpanWithRemoteParentMock.expectations {
if mm_atomic.LoadUint64(&e.Counter) < 1 {
return false
}
}
// if default expectation was set then invocations count should be greater than zero
if m.StartSpanWithRem... | MinimockStartSpanWithRemoteParentDone returns true if the count of the StartSpanWithRemoteParent invocations corresponds
the number of defined expectations | MinimockStartSpanWithRemoteParentDone | go | hexdigest/gowrap | templates_tests/tracer_opencensus_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/tracer_opencensus_mock_test.go | MIT |
func (m *TracerOpenCensusMock) MinimockFinish() {
if !m.minimockDone() {
m.MinimockFromContextInspect()
m.MinimockNewContextInspect()
m.MinimockStartSpanInspect()
m.MinimockStartSpanWithRemoteParentInspect()
m.t.FailNow()
}
} | MinimockFinish checks that all mocked methods have been called the expected number of times | MinimockFinish | go | hexdigest/gowrap | templates_tests/tracer_opencensus_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/tracer_opencensus_mock_test.go | MIT |
func (m *TracerOpenCensusMock) MinimockWait(timeout mm_time.Duration) {
timeoutCh := mm_time.After(timeout)
for {
if m.minimockDone() {
return
}
select {
case <-timeoutCh:
m.MinimockFinish()
return
case <-mm_time.After(10 * mm_time.Millisecond):
}
}
} | MinimockWait waits for all mocked methods to be called the expected number of times | MinimockWait | go | hexdigest/gowrap | templates_tests/tracer_opencensus_mock_test.go | https://github.com/hexdigest/gowrap/blob/master/templates_tests/tracer_opencensus_mock_test.go | MIT |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.