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 (m *mSpanMockLogKV) Return() *SpanMock {
m.mock.LogKVFunc = func(p ...interface{}) {
return
}
return m.mock
}
|
Return sets up a mock for Span.LogKV to return Return's arguments
|
Return
|
go
|
hexdigest/gowrap
|
templates_tests/span_mock_test.go
|
https://github.com/hexdigest/gowrap/blob/master/templates_tests/span_mock_test.go
|
MIT
|
func (m *mSpanMockLogKV) Set(f func(p ...interface{})) *SpanMock {
m.mock.LogKVFunc = f
return m.mock
}
|
Set uses given function f as a mock of Span.LogKV method
|
Set
|
go
|
hexdigest/gowrap
|
templates_tests/span_mock_test.go
|
https://github.com/hexdigest/gowrap/blob/master/templates_tests/span_mock_test.go
|
MIT
|
func (m *SpanMock) LogKV(p ...interface{}) {
atomic.AddUint64(&m.LogKVPreCounter, 1)
defer atomic.AddUint64(&m.LogKVCounter, 1)
if m.LogKVMock.mockExpectations != nil {
testify_assert.Equal(m.t, *m.LogKVMock.mockExpectations, SpanMockLogKVParams{p},
"Span.LogKV got unexpected parameters")
if m.LogKVFunc == nil {
m.t.Fatal("No results are set for the SpanMock.LogKV")
return
}
}
if m.LogKVFunc == nil {
m.t.Fatal("Unexpected call to SpanMock.LogKV")
return
}
m.LogKVFunc(p...)
}
|
LogKV implements github.com/opentracing/opentracing-go.Span interface
|
LogKV
|
go
|
hexdigest/gowrap
|
templates_tests/span_mock_test.go
|
https://github.com/hexdigest/gowrap/blob/master/templates_tests/span_mock_test.go
|
MIT
|
func (m *SpanMock) LogKVMinimockCounter() uint64 {
return atomic.LoadUint64(&m.LogKVCounter)
}
|
LogKVMinimockCounter returns a count of SpanMock.LogKVFunc invocations
|
LogKVMinimockCounter
|
go
|
hexdigest/gowrap
|
templates_tests/span_mock_test.go
|
https://github.com/hexdigest/gowrap/blob/master/templates_tests/span_mock_test.go
|
MIT
|
func (m *SpanMock) LogKVMinimockPreCounter() uint64 {
return atomic.LoadUint64(&m.LogKVPreCounter)
}
|
LogKVMinimockPreCounter returns the value of SpanMock.LogKV invocations
|
LogKVMinimockPreCounter
|
go
|
hexdigest/gowrap
|
templates_tests/span_mock_test.go
|
https://github.com/hexdigest/gowrap/blob/master/templates_tests/span_mock_test.go
|
MIT
|
func (m *mSpanMockSetBaggageItem) Expect(p string, p1 string) *mSpanMockSetBaggageItem {
m.mockExpectations = &SpanMockSetBaggageItemParams{p, p1}
return m
}
|
Expect sets up expected params for the Span.SetBaggageItem
|
Expect
|
go
|
hexdigest/gowrap
|
templates_tests/span_mock_test.go
|
https://github.com/hexdigest/gowrap/blob/master/templates_tests/span_mock_test.go
|
MIT
|
func (m *mSpanMockSetBaggageItem) Return(r opentracing.Span) *SpanMock {
m.mock.SetBaggageItemFunc = func(p string, p1 string) opentracing.Span {
return r
}
return m.mock
}
|
Return sets up a mock for Span.SetBaggageItem to return Return's arguments
|
Return
|
go
|
hexdigest/gowrap
|
templates_tests/span_mock_test.go
|
https://github.com/hexdigest/gowrap/blob/master/templates_tests/span_mock_test.go
|
MIT
|
func (m *mSpanMockSetBaggageItem) Set(f func(p string, p1 string) (r opentracing.Span)) *SpanMock {
m.mock.SetBaggageItemFunc = f
return m.mock
}
|
Set uses given function f as a mock of Span.SetBaggageItem method
|
Set
|
go
|
hexdigest/gowrap
|
templates_tests/span_mock_test.go
|
https://github.com/hexdigest/gowrap/blob/master/templates_tests/span_mock_test.go
|
MIT
|
func (m *SpanMock) SetBaggageItem(p string, p1 string) (r opentracing.Span) {
atomic.AddUint64(&m.SetBaggageItemPreCounter, 1)
defer atomic.AddUint64(&m.SetBaggageItemCounter, 1)
if m.SetBaggageItemMock.mockExpectations != nil {
testify_assert.Equal(m.t, *m.SetBaggageItemMock.mockExpectations, SpanMockSetBaggageItemParams{p, p1},
"Span.SetBaggageItem got unexpected parameters")
if m.SetBaggageItemFunc == nil {
m.t.Fatal("No results are set for the SpanMock.SetBaggageItem")
return
}
}
if m.SetBaggageItemFunc == nil {
m.t.Fatal("Unexpected call to SpanMock.SetBaggageItem")
return
}
return m.SetBaggageItemFunc(p, p1)
}
|
SetBaggageItem implements github.com/opentracing/opentracing-go.Span interface
|
SetBaggageItem
|
go
|
hexdigest/gowrap
|
templates_tests/span_mock_test.go
|
https://github.com/hexdigest/gowrap/blob/master/templates_tests/span_mock_test.go
|
MIT
|
func (m *SpanMock) SetBaggageItemMinimockCounter() uint64 {
return atomic.LoadUint64(&m.SetBaggageItemCounter)
}
|
SetBaggageItemMinimockCounter returns a count of SpanMock.SetBaggageItemFunc invocations
|
SetBaggageItemMinimockCounter
|
go
|
hexdigest/gowrap
|
templates_tests/span_mock_test.go
|
https://github.com/hexdigest/gowrap/blob/master/templates_tests/span_mock_test.go
|
MIT
|
func (m *SpanMock) SetBaggageItemMinimockPreCounter() uint64 {
return atomic.LoadUint64(&m.SetBaggageItemPreCounter)
}
|
SetBaggageItemMinimockPreCounter returns the value of SpanMock.SetBaggageItem invocations
|
SetBaggageItemMinimockPreCounter
|
go
|
hexdigest/gowrap
|
templates_tests/span_mock_test.go
|
https://github.com/hexdigest/gowrap/blob/master/templates_tests/span_mock_test.go
|
MIT
|
func (m *mSpanMockSetOperationName) Expect(p string) *mSpanMockSetOperationName {
m.mockExpectations = &SpanMockSetOperationNameParams{p}
return m
}
|
Expect sets up expected params for the Span.SetOperationName
|
Expect
|
go
|
hexdigest/gowrap
|
templates_tests/span_mock_test.go
|
https://github.com/hexdigest/gowrap/blob/master/templates_tests/span_mock_test.go
|
MIT
|
func (m *mSpanMockSetOperationName) Return(r opentracing.Span) *SpanMock {
m.mock.SetOperationNameFunc = func(p string) opentracing.Span {
return r
}
return m.mock
}
|
Return sets up a mock for Span.SetOperationName to return Return's arguments
|
Return
|
go
|
hexdigest/gowrap
|
templates_tests/span_mock_test.go
|
https://github.com/hexdigest/gowrap/blob/master/templates_tests/span_mock_test.go
|
MIT
|
func (m *mSpanMockSetOperationName) Set(f func(p string) (r opentracing.Span)) *SpanMock {
m.mock.SetOperationNameFunc = f
return m.mock
}
|
Set uses given function f as a mock of Span.SetOperationName method
|
Set
|
go
|
hexdigest/gowrap
|
templates_tests/span_mock_test.go
|
https://github.com/hexdigest/gowrap/blob/master/templates_tests/span_mock_test.go
|
MIT
|
func (m *SpanMock) SetOperationName(p string) (r opentracing.Span) {
atomic.AddUint64(&m.SetOperationNamePreCounter, 1)
defer atomic.AddUint64(&m.SetOperationNameCounter, 1)
if m.SetOperationNameMock.mockExpectations != nil {
testify_assert.Equal(m.t, *m.SetOperationNameMock.mockExpectations, SpanMockSetOperationNameParams{p},
"Span.SetOperationName got unexpected parameters")
if m.SetOperationNameFunc == nil {
m.t.Fatal("No results are set for the SpanMock.SetOperationName")
return
}
}
if m.SetOperationNameFunc == nil {
m.t.Fatal("Unexpected call to SpanMock.SetOperationName")
return
}
return m.SetOperationNameFunc(p)
}
|
SetOperationName implements github.com/opentracing/opentracing-go.Span interface
|
SetOperationName
|
go
|
hexdigest/gowrap
|
templates_tests/span_mock_test.go
|
https://github.com/hexdigest/gowrap/blob/master/templates_tests/span_mock_test.go
|
MIT
|
func (m *SpanMock) SetOperationNameMinimockCounter() uint64 {
return atomic.LoadUint64(&m.SetOperationNameCounter)
}
|
SetOperationNameMinimockCounter returns a count of SpanMock.SetOperationNameFunc invocations
|
SetOperationNameMinimockCounter
|
go
|
hexdigest/gowrap
|
templates_tests/span_mock_test.go
|
https://github.com/hexdigest/gowrap/blob/master/templates_tests/span_mock_test.go
|
MIT
|
func (m *SpanMock) SetOperationNameMinimockPreCounter() uint64 {
return atomic.LoadUint64(&m.SetOperationNamePreCounter)
}
|
SetOperationNameMinimockPreCounter returns the value of SpanMock.SetOperationName invocations
|
SetOperationNameMinimockPreCounter
|
go
|
hexdigest/gowrap
|
templates_tests/span_mock_test.go
|
https://github.com/hexdigest/gowrap/blob/master/templates_tests/span_mock_test.go
|
MIT
|
func (m *mSpanMockSetTag) Expect(p string, p1 interface{}) *mSpanMockSetTag {
m.mockExpectations = &SpanMockSetTagParams{p, p1}
return m
}
|
Expect sets up expected params for the Span.SetTag
|
Expect
|
go
|
hexdigest/gowrap
|
templates_tests/span_mock_test.go
|
https://github.com/hexdigest/gowrap/blob/master/templates_tests/span_mock_test.go
|
MIT
|
func (m *mSpanMockSetTag) Return(r opentracing.Span) *SpanMock {
m.mock.SetTagFunc = func(p string, p1 interface{}) opentracing.Span {
return r
}
return m.mock
}
|
Return sets up a mock for Span.SetTag to return Return's arguments
|
Return
|
go
|
hexdigest/gowrap
|
templates_tests/span_mock_test.go
|
https://github.com/hexdigest/gowrap/blob/master/templates_tests/span_mock_test.go
|
MIT
|
func (m *mSpanMockSetTag) Set(f func(p string, p1 interface{}) (r opentracing.Span)) *SpanMock {
m.mock.SetTagFunc = f
return m.mock
}
|
Set uses given function f as a mock of Span.SetTag method
|
Set
|
go
|
hexdigest/gowrap
|
templates_tests/span_mock_test.go
|
https://github.com/hexdigest/gowrap/blob/master/templates_tests/span_mock_test.go
|
MIT
|
func (m *SpanMock) SetTag(p string, p1 interface{}) (r opentracing.Span) {
atomic.AddUint64(&m.SetTagPreCounter, 1)
defer atomic.AddUint64(&m.SetTagCounter, 1)
if m.SetTagMock.mockExpectations != nil {
testify_assert.Equal(m.t, *m.SetTagMock.mockExpectations, SpanMockSetTagParams{p, p1},
"Span.SetTag got unexpected parameters")
if m.SetTagFunc == nil {
m.t.Fatal("No results are set for the SpanMock.SetTag")
return
}
}
if m.SetTagFunc == nil {
m.t.Fatal("Unexpected call to SpanMock.SetTag")
return
}
return m.SetTagFunc(p, p1)
}
|
SetTag implements github.com/opentracing/opentracing-go.Span interface
|
SetTag
|
go
|
hexdigest/gowrap
|
templates_tests/span_mock_test.go
|
https://github.com/hexdigest/gowrap/blob/master/templates_tests/span_mock_test.go
|
MIT
|
func (m *SpanMock) SetTagMinimockCounter() uint64 {
return atomic.LoadUint64(&m.SetTagCounter)
}
|
SetTagMinimockCounter returns a count of SpanMock.SetTagFunc invocations
|
SetTagMinimockCounter
|
go
|
hexdigest/gowrap
|
templates_tests/span_mock_test.go
|
https://github.com/hexdigest/gowrap/blob/master/templates_tests/span_mock_test.go
|
MIT
|
func (m *SpanMock) SetTagMinimockPreCounter() uint64 {
return atomic.LoadUint64(&m.SetTagPreCounter)
}
|
SetTagMinimockPreCounter returns the value of SpanMock.SetTag invocations
|
SetTagMinimockPreCounter
|
go
|
hexdigest/gowrap
|
templates_tests/span_mock_test.go
|
https://github.com/hexdigest/gowrap/blob/master/templates_tests/span_mock_test.go
|
MIT
|
func (m *mSpanMockTracer) Return(r opentracing.Tracer) *SpanMock {
m.mock.TracerFunc = func() opentracing.Tracer {
return r
}
return m.mock
}
|
Return sets up a mock for Span.Tracer to return Return's arguments
|
Return
|
go
|
hexdigest/gowrap
|
templates_tests/span_mock_test.go
|
https://github.com/hexdigest/gowrap/blob/master/templates_tests/span_mock_test.go
|
MIT
|
func (m *mSpanMockTracer) Set(f func() (r opentracing.Tracer)) *SpanMock {
m.mock.TracerFunc = f
return m.mock
}
|
Set uses given function f as a mock of Span.Tracer method
|
Set
|
go
|
hexdigest/gowrap
|
templates_tests/span_mock_test.go
|
https://github.com/hexdigest/gowrap/blob/master/templates_tests/span_mock_test.go
|
MIT
|
func (m *SpanMock) Tracer() (r opentracing.Tracer) {
atomic.AddUint64(&m.TracerPreCounter, 1)
defer atomic.AddUint64(&m.TracerCounter, 1)
if m.TracerFunc == nil {
m.t.Fatal("Unexpected call to SpanMock.Tracer")
return
}
return m.TracerFunc()
}
|
Tracer implements github.com/opentracing/opentracing-go.Span interface
|
Tracer
|
go
|
hexdigest/gowrap
|
templates_tests/span_mock_test.go
|
https://github.com/hexdigest/gowrap/blob/master/templates_tests/span_mock_test.go
|
MIT
|
func (m *SpanMock) TracerMinimockCounter() uint64 {
return atomic.LoadUint64(&m.TracerCounter)
}
|
TracerMinimockCounter returns a count of SpanMock.TracerFunc invocations
|
TracerMinimockCounter
|
go
|
hexdigest/gowrap
|
templates_tests/span_mock_test.go
|
https://github.com/hexdigest/gowrap/blob/master/templates_tests/span_mock_test.go
|
MIT
|
func (m *SpanMock) TracerMinimockPreCounter() uint64 {
return atomic.LoadUint64(&m.TracerPreCounter)
}
|
TracerMinimockPreCounter returns the value of SpanMock.Tracer invocations
|
TracerMinimockPreCounter
|
go
|
hexdigest/gowrap
|
templates_tests/span_mock_test.go
|
https://github.com/hexdigest/gowrap/blob/master/templates_tests/span_mock_test.go
|
MIT
|
func (m *SpanMock) ValidateCallCounters() {
if m.BaggageItemFunc != nil && atomic.LoadUint64(&m.BaggageItemCounter) == 0 {
m.t.Fatal("Expected call to SpanMock.BaggageItem")
}
if m.ContextFunc != nil && atomic.LoadUint64(&m.ContextCounter) == 0 {
m.t.Fatal("Expected call to SpanMock.Context")
}
if m.FinishFunc != nil && atomic.LoadUint64(&m.FinishCounter) == 0 {
m.t.Fatal("Expected call to SpanMock.Finish")
}
if m.FinishWithOptionsFunc != nil && atomic.LoadUint64(&m.FinishWithOptionsCounter) == 0 {
m.t.Fatal("Expected call to SpanMock.FinishWithOptions")
}
if m.LogFunc != nil && atomic.LoadUint64(&m.LogCounter) == 0 {
m.t.Fatal("Expected call to SpanMock.Log")
}
if m.LogEventFunc != nil && atomic.LoadUint64(&m.LogEventCounter) == 0 {
m.t.Fatal("Expected call to SpanMock.LogEvent")
}
if m.LogEventWithPayloadFunc != nil && atomic.LoadUint64(&m.LogEventWithPayloadCounter) == 0 {
m.t.Fatal("Expected call to SpanMock.LogEventWithPayload")
}
if m.LogFieldsFunc != nil && atomic.LoadUint64(&m.LogFieldsCounter) == 0 {
m.t.Fatal("Expected call to SpanMock.LogFields")
}
if m.LogKVFunc != nil && atomic.LoadUint64(&m.LogKVCounter) == 0 {
m.t.Fatal("Expected call to SpanMock.LogKV")
}
if m.SetBaggageItemFunc != nil && atomic.LoadUint64(&m.SetBaggageItemCounter) == 0 {
m.t.Fatal("Expected call to SpanMock.SetBaggageItem")
}
if m.SetOperationNameFunc != nil && atomic.LoadUint64(&m.SetOperationNameCounter) == 0 {
m.t.Fatal("Expected call to SpanMock.SetOperationName")
}
if m.SetTagFunc != nil && atomic.LoadUint64(&m.SetTagCounter) == 0 {
m.t.Fatal("Expected call to SpanMock.SetTag")
}
if m.TracerFunc != nil && atomic.LoadUint64(&m.TracerCounter) == 0 {
m.t.Fatal("Expected call to SpanMock.Tracer")
}
}
|
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/span_mock_test.go
|
https://github.com/hexdigest/gowrap/blob/master/templates_tests/span_mock_test.go
|
MIT
|
func (m *SpanMock) MinimockFinish() {
if m.BaggageItemFunc != nil && atomic.LoadUint64(&m.BaggageItemCounter) == 0 {
m.t.Fatal("Expected call to SpanMock.BaggageItem")
}
if m.ContextFunc != nil && atomic.LoadUint64(&m.ContextCounter) == 0 {
m.t.Fatal("Expected call to SpanMock.Context")
}
if m.FinishFunc != nil && atomic.LoadUint64(&m.FinishCounter) == 0 {
m.t.Fatal("Expected call to SpanMock.Finish")
}
if m.FinishWithOptionsFunc != nil && atomic.LoadUint64(&m.FinishWithOptionsCounter) == 0 {
m.t.Fatal("Expected call to SpanMock.FinishWithOptions")
}
if m.LogFunc != nil && atomic.LoadUint64(&m.LogCounter) == 0 {
m.t.Fatal("Expected call to SpanMock.Log")
}
if m.LogEventFunc != nil && atomic.LoadUint64(&m.LogEventCounter) == 0 {
m.t.Fatal("Expected call to SpanMock.LogEvent")
}
if m.LogEventWithPayloadFunc != nil && atomic.LoadUint64(&m.LogEventWithPayloadCounter) == 0 {
m.t.Fatal("Expected call to SpanMock.LogEventWithPayload")
}
if m.LogFieldsFunc != nil && atomic.LoadUint64(&m.LogFieldsCounter) == 0 {
m.t.Fatal("Expected call to SpanMock.LogFields")
}
if m.LogKVFunc != nil && atomic.LoadUint64(&m.LogKVCounter) == 0 {
m.t.Fatal("Expected call to SpanMock.LogKV")
}
if m.SetBaggageItemFunc != nil && atomic.LoadUint64(&m.SetBaggageItemCounter) == 0 {
m.t.Fatal("Expected call to SpanMock.SetBaggageItem")
}
if m.SetOperationNameFunc != nil && atomic.LoadUint64(&m.SetOperationNameCounter) == 0 {
m.t.Fatal("Expected call to SpanMock.SetOperationName")
}
if m.SetTagFunc != nil && atomic.LoadUint64(&m.SetTagCounter) == 0 {
m.t.Fatal("Expected call to SpanMock.SetTag")
}
if m.TracerFunc != nil && atomic.LoadUint64(&m.TracerCounter) == 0 {
m.t.Fatal("Expected call to SpanMock.Tracer")
}
}
|
MinimockFinish checks that all mocked methods of the interface have been called at least once
|
MinimockFinish
|
go
|
hexdigest/gowrap
|
templates_tests/span_mock_test.go
|
https://github.com/hexdigest/gowrap/blob/master/templates_tests/span_mock_test.go
|
MIT
|
func (m *SpanMock) MinimockWait(timeout time.Duration) {
timeoutCh := time.After(timeout)
for {
ok := true
ok = ok && (m.BaggageItemFunc == nil || atomic.LoadUint64(&m.BaggageItemCounter) > 0)
ok = ok && (m.ContextFunc == nil || atomic.LoadUint64(&m.ContextCounter) > 0)
ok = ok && (m.FinishFunc == nil || atomic.LoadUint64(&m.FinishCounter) > 0)
ok = ok && (m.FinishWithOptionsFunc == nil || atomic.LoadUint64(&m.FinishWithOptionsCounter) > 0)
ok = ok && (m.LogFunc == nil || atomic.LoadUint64(&m.LogCounter) > 0)
ok = ok && (m.LogEventFunc == nil || atomic.LoadUint64(&m.LogEventCounter) > 0)
ok = ok && (m.LogEventWithPayloadFunc == nil || atomic.LoadUint64(&m.LogEventWithPayloadCounter) > 0)
ok = ok && (m.LogFieldsFunc == nil || atomic.LoadUint64(&m.LogFieldsCounter) > 0)
ok = ok && (m.LogKVFunc == nil || atomic.LoadUint64(&m.LogKVCounter) > 0)
ok = ok && (m.SetBaggageItemFunc == nil || atomic.LoadUint64(&m.SetBaggageItemCounter) > 0)
ok = ok && (m.SetOperationNameFunc == nil || atomic.LoadUint64(&m.SetOperationNameCounter) > 0)
ok = ok && (m.SetTagFunc == nil || atomic.LoadUint64(&m.SetTagCounter) > 0)
ok = ok && (m.TracerFunc == nil || atomic.LoadUint64(&m.TracerCounter) > 0)
if ok {
return
}
select {
case <-timeoutCh:
if m.BaggageItemFunc != nil && atomic.LoadUint64(&m.BaggageItemCounter) == 0 {
m.t.Error("Expected call to SpanMock.BaggageItem")
}
if m.ContextFunc != nil && atomic.LoadUint64(&m.ContextCounter) == 0 {
m.t.Error("Expected call to SpanMock.Context")
}
if m.FinishFunc != nil && atomic.LoadUint64(&m.FinishCounter) == 0 {
m.t.Error("Expected call to SpanMock.Finish")
}
if m.FinishWithOptionsFunc != nil && atomic.LoadUint64(&m.FinishWithOptionsCounter) == 0 {
m.t.Error("Expected call to SpanMock.FinishWithOptions")
}
if m.LogFunc != nil && atomic.LoadUint64(&m.LogCounter) == 0 {
m.t.Error("Expected call to SpanMock.Log")
}
if m.LogEventFunc != nil && atomic.LoadUint64(&m.LogEventCounter) == 0 {
m.t.Error("Expected call to SpanMock.LogEvent")
}
if m.LogEventWithPayloadFunc != nil && atomic.LoadUint64(&m.LogEventWithPayloadCounter) == 0 {
m.t.Error("Expected call to SpanMock.LogEventWithPayload")
}
if m.LogFieldsFunc != nil && atomic.LoadUint64(&m.LogFieldsCounter) == 0 {
m.t.Error("Expected call to SpanMock.LogFields")
}
if m.LogKVFunc != nil && atomic.LoadUint64(&m.LogKVCounter) == 0 {
m.t.Error("Expected call to SpanMock.LogKV")
}
if m.SetBaggageItemFunc != nil && atomic.LoadUint64(&m.SetBaggageItemCounter) == 0 {
m.t.Error("Expected call to SpanMock.SetBaggageItem")
}
if m.SetOperationNameFunc != nil && atomic.LoadUint64(&m.SetOperationNameCounter) == 0 {
m.t.Error("Expected call to SpanMock.SetOperationName")
}
if m.SetTagFunc != nil && atomic.LoadUint64(&m.SetTagCounter) == 0 {
m.t.Error("Expected call to SpanMock.SetTag")
}
if m.TracerFunc != nil && atomic.LoadUint64(&m.TracerCounter) == 0 {
m.t.Error("Expected call to SpanMock.Tracer")
}
m.t.Fatalf("Some mocks were not called on time: %s", timeout)
return
default:
time.Sleep(time.Millisecond)
}
}
}
|
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/span_mock_test.go
|
https://github.com/hexdigest/gowrap/blob/master/templates_tests/span_mock_test.go
|
MIT
|
func (m *SpanMock) AllMocksCalled() bool {
if m.BaggageItemFunc != nil && atomic.LoadUint64(&m.BaggageItemCounter) == 0 {
return false
}
if m.ContextFunc != nil && atomic.LoadUint64(&m.ContextCounter) == 0 {
return false
}
if m.FinishFunc != nil && atomic.LoadUint64(&m.FinishCounter) == 0 {
return false
}
if m.FinishWithOptionsFunc != nil && atomic.LoadUint64(&m.FinishWithOptionsCounter) == 0 {
return false
}
if m.LogFunc != nil && atomic.LoadUint64(&m.LogCounter) == 0 {
return false
}
if m.LogEventFunc != nil && atomic.LoadUint64(&m.LogEventCounter) == 0 {
return false
}
if m.LogEventWithPayloadFunc != nil && atomic.LoadUint64(&m.LogEventWithPayloadCounter) == 0 {
return false
}
if m.LogFieldsFunc != nil && atomic.LoadUint64(&m.LogFieldsCounter) == 0 {
return false
}
if m.LogKVFunc != nil && atomic.LoadUint64(&m.LogKVCounter) == 0 {
return false
}
if m.SetBaggageItemFunc != nil && atomic.LoadUint64(&m.SetBaggageItemCounter) == 0 {
return false
}
if m.SetOperationNameFunc != nil && atomic.LoadUint64(&m.SetOperationNameCounter) == 0 {
return false
}
if m.SetTagFunc != nil && atomic.LoadUint64(&m.SetTagCounter) == 0 {
return false
}
if m.TracerFunc != nil && atomic.LoadUint64(&m.TracerCounter) == 0 {
return false
}
return true
}
|
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/span_mock_test.go
|
https://github.com/hexdigest/gowrap/blob/master/templates_tests/span_mock_test.go
|
MIT
|
func NewSpanInterfaceMock(t minimock.Tester) *SpanInterfaceMock {
m := &SpanInterfaceMock{t: t}
if controller, ok := t.(minimock.MockController); ok {
controller.RegisterMocker(m)
}
m.AddAttributesMock = mSpanInterfaceMockAddAttributes{mock: m}
m.AddAttributesMock.callArgs = []*SpanInterfaceMockAddAttributesParams{}
m.AddLinkMock = mSpanInterfaceMockAddLink{mock: m}
m.AddLinkMock.callArgs = []*SpanInterfaceMockAddLinkParams{}
m.AddMessageReceiveEventMock = mSpanInterfaceMockAddMessageReceiveEvent{mock: m}
m.AddMessageReceiveEventMock.callArgs = []*SpanInterfaceMockAddMessageReceiveEventParams{}
m.AddMessageSendEventMock = mSpanInterfaceMockAddMessageSendEvent{mock: m}
m.AddMessageSendEventMock.callArgs = []*SpanInterfaceMockAddMessageSendEventParams{}
m.AnnotateMock = mSpanInterfaceMockAnnotate{mock: m}
m.AnnotateMock.callArgs = []*SpanInterfaceMockAnnotateParams{}
m.AnnotatefMock = mSpanInterfaceMockAnnotatef{mock: m}
m.AnnotatefMock.callArgs = []*SpanInterfaceMockAnnotatefParams{}
m.EndMock = mSpanInterfaceMockEnd{mock: m}
m.IsRecordingEventsMock = mSpanInterfaceMockIsRecordingEvents{mock: m}
m.SetNameMock = mSpanInterfaceMockSetName{mock: m}
m.SetNameMock.callArgs = []*SpanInterfaceMockSetNameParams{}
m.SetStatusMock = mSpanInterfaceMockSetStatus{mock: m}
m.SetStatusMock.callArgs = []*SpanInterfaceMockSetStatusParams{}
m.SpanContextMock = mSpanInterfaceMockSpanContext{mock: m}
m.StringMock = mSpanInterfaceMockString{mock: m}
return m
}
|
NewSpanInterfaceMock returns a mock for trace.SpanInterface
|
NewSpanInterfaceMock
|
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 (mmAddAttributes *mSpanInterfaceMockAddAttributes) Expect(attributes ...mm_trace.Attribute) *mSpanInterfaceMockAddAttributes {
if mmAddAttributes.mock.funcAddAttributes != nil {
mmAddAttributes.mock.t.Fatalf("SpanInterfaceMock.AddAttributes mock is already set by Set")
}
if mmAddAttributes.defaultExpectation == nil {
mmAddAttributes.defaultExpectation = &SpanInterfaceMockAddAttributesExpectation{}
}
mmAddAttributes.defaultExpectation.params = &SpanInterfaceMockAddAttributesParams{attributes}
for _, e := range mmAddAttributes.expectations {
if minimock.Equal(e.params, mmAddAttributes.defaultExpectation.params) {
mmAddAttributes.mock.t.Fatalf("Expectation set by When has same params: %#v", *mmAddAttributes.defaultExpectation.params)
}
}
return mmAddAttributes
}
|
Expect sets up expected params for SpanInterface.AddAttributes
|
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 (mmAddAttributes *mSpanInterfaceMockAddAttributes) Inspect(f func(attributes ...mm_trace.Attribute)) *mSpanInterfaceMockAddAttributes {
if mmAddAttributes.mock.inspectFuncAddAttributes != nil {
mmAddAttributes.mock.t.Fatalf("Inspect function is already set for SpanInterfaceMock.AddAttributes")
}
mmAddAttributes.mock.inspectFuncAddAttributes = f
return mmAddAttributes
}
|
Inspect accepts an inspector function that has same arguments as the SpanInterface.AddAttributes
|
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 (mmAddAttributes *mSpanInterfaceMockAddAttributes) Return() *SpanInterfaceMock {
if mmAddAttributes.mock.funcAddAttributes != nil {
mmAddAttributes.mock.t.Fatalf("SpanInterfaceMock.AddAttributes mock is already set by Set")
}
if mmAddAttributes.defaultExpectation == nil {
mmAddAttributes.defaultExpectation = &SpanInterfaceMockAddAttributesExpectation{mock: mmAddAttributes.mock}
}
return mmAddAttributes.mock
}
|
Return sets up results that will be returned by SpanInterface.AddAttributes
|
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 (mmAddAttributes *mSpanInterfaceMockAddAttributes) Set(f func(attributes ...mm_trace.Attribute)) *SpanInterfaceMock {
if mmAddAttributes.defaultExpectation != nil {
mmAddAttributes.mock.t.Fatalf("Default expectation is already set for the SpanInterface.AddAttributes method")
}
if len(mmAddAttributes.expectations) > 0 {
mmAddAttributes.mock.t.Fatalf("Some expectations are already set for the SpanInterface.AddAttributes method")
}
mmAddAttributes.mock.funcAddAttributes = f
return mmAddAttributes.mock
}
|
Set uses given function f to mock the SpanInterface.AddAttributes 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 (mmAddAttributes *SpanInterfaceMock) AddAttributesAfterCounter() uint64 {
return mm_atomic.LoadUint64(&mmAddAttributes.afterAddAttributesCounter)
}
|
AddAttributesAfterCounter returns a count of finished SpanInterfaceMock.AddAttributes invocations
|
AddAttributesAfterCounter
|
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 (mmAddAttributes *SpanInterfaceMock) AddAttributesBeforeCounter() uint64 {
return mm_atomic.LoadUint64(&mmAddAttributes.beforeAddAttributesCounter)
}
|
AddAttributesBeforeCounter returns a count of SpanInterfaceMock.AddAttributes invocations
|
AddAttributesBeforeCounter
|
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 (mmAddAttributes *mSpanInterfaceMockAddAttributes) Calls() []*SpanInterfaceMockAddAttributesParams {
mmAddAttributes.mutex.RLock()
argCopy := make([]*SpanInterfaceMockAddAttributesParams, len(mmAddAttributes.callArgs))
copy(argCopy, mmAddAttributes.callArgs)
mmAddAttributes.mutex.RUnlock()
return argCopy
}
|
Calls returns a list of arguments used in each call to SpanInterfaceMock.AddAttributes.
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) MinimockAddAttributesDone() bool {
for _, e := range m.AddAttributesMock.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.AddAttributesMock.defaultExpectation != nil && mm_atomic.LoadUint64(&m.afterAddAttributesCounter) < 1 {
return false
}
// if func was set then invocations count should be greater than zero
if m.funcAddAttributes != nil && mm_atomic.LoadUint64(&m.afterAddAttributesCounter) < 1 {
return false
}
return true
}
|
MinimockAddAttributesDone returns true if the count of the AddAttributes invocations corresponds
the number of defined expectations
|
MinimockAddAttributesDone
|
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 (mmAddLink *mSpanInterfaceMockAddLink) Expect(l mm_trace.Link) *mSpanInterfaceMockAddLink {
if mmAddLink.mock.funcAddLink != nil {
mmAddLink.mock.t.Fatalf("SpanInterfaceMock.AddLink mock is already set by Set")
}
if mmAddLink.defaultExpectation == nil {
mmAddLink.defaultExpectation = &SpanInterfaceMockAddLinkExpectation{}
}
mmAddLink.defaultExpectation.params = &SpanInterfaceMockAddLinkParams{l}
for _, e := range mmAddLink.expectations {
if minimock.Equal(e.params, mmAddLink.defaultExpectation.params) {
mmAddLink.mock.t.Fatalf("Expectation set by When has same params: %#v", *mmAddLink.defaultExpectation.params)
}
}
return mmAddLink
}
|
Expect sets up expected params for SpanInterface.AddLink
|
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 (mmAddLink *mSpanInterfaceMockAddLink) Inspect(f func(l mm_trace.Link)) *mSpanInterfaceMockAddLink {
if mmAddLink.mock.inspectFuncAddLink != nil {
mmAddLink.mock.t.Fatalf("Inspect function is already set for SpanInterfaceMock.AddLink")
}
mmAddLink.mock.inspectFuncAddLink = f
return mmAddLink
}
|
Inspect accepts an inspector function that has same arguments as the SpanInterface.AddLink
|
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 (mmAddLink *mSpanInterfaceMockAddLink) Return() *SpanInterfaceMock {
if mmAddLink.mock.funcAddLink != nil {
mmAddLink.mock.t.Fatalf("SpanInterfaceMock.AddLink mock is already set by Set")
}
if mmAddLink.defaultExpectation == nil {
mmAddLink.defaultExpectation = &SpanInterfaceMockAddLinkExpectation{mock: mmAddLink.mock}
}
return mmAddLink.mock
}
|
Return sets up results that will be returned by SpanInterface.AddLink
|
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 (mmAddLink *mSpanInterfaceMockAddLink) Set(f func(l mm_trace.Link)) *SpanInterfaceMock {
if mmAddLink.defaultExpectation != nil {
mmAddLink.mock.t.Fatalf("Default expectation is already set for the SpanInterface.AddLink method")
}
if len(mmAddLink.expectations) > 0 {
mmAddLink.mock.t.Fatalf("Some expectations are already set for the SpanInterface.AddLink method")
}
mmAddLink.mock.funcAddLink = f
return mmAddLink.mock
}
|
Set uses given function f to mock the SpanInterface.AddLink 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 (mmAddLink *SpanInterfaceMock) AddLinkAfterCounter() uint64 {
return mm_atomic.LoadUint64(&mmAddLink.afterAddLinkCounter)
}
|
AddLinkAfterCounter returns a count of finished SpanInterfaceMock.AddLink invocations
|
AddLinkAfterCounter
|
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 (mmAddLink *SpanInterfaceMock) AddLinkBeforeCounter() uint64 {
return mm_atomic.LoadUint64(&mmAddLink.beforeAddLinkCounter)
}
|
AddLinkBeforeCounter returns a count of SpanInterfaceMock.AddLink invocations
|
AddLinkBeforeCounter
|
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 (mmAddLink *mSpanInterfaceMockAddLink) Calls() []*SpanInterfaceMockAddLinkParams {
mmAddLink.mutex.RLock()
argCopy := make([]*SpanInterfaceMockAddLinkParams, len(mmAddLink.callArgs))
copy(argCopy, mmAddLink.callArgs)
mmAddLink.mutex.RUnlock()
return argCopy
}
|
Calls returns a list of arguments used in each call to SpanInterfaceMock.AddLink.
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) MinimockAddLinkDone() bool {
for _, e := range m.AddLinkMock.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.AddLinkMock.defaultExpectation != nil && mm_atomic.LoadUint64(&m.afterAddLinkCounter) < 1 {
return false
}
// if func was set then invocations count should be greater than zero
if m.funcAddLink != nil && mm_atomic.LoadUint64(&m.afterAddLinkCounter) < 1 {
return false
}
return true
}
|
MinimockAddLinkDone returns true if the count of the AddLink invocations corresponds
the number of defined expectations
|
MinimockAddLinkDone
|
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 (mmAddMessageReceiveEvent *mSpanInterfaceMockAddMessageReceiveEvent) Expect(messageID int64, uncompressedByteSize int64, compressedByteSize int64) *mSpanInterfaceMockAddMessageReceiveEvent {
if mmAddMessageReceiveEvent.mock.funcAddMessageReceiveEvent != nil {
mmAddMessageReceiveEvent.mock.t.Fatalf("SpanInterfaceMock.AddMessageReceiveEvent mock is already set by Set")
}
if mmAddMessageReceiveEvent.defaultExpectation == nil {
mmAddMessageReceiveEvent.defaultExpectation = &SpanInterfaceMockAddMessageReceiveEventExpectation{}
}
mmAddMessageReceiveEvent.defaultExpectation.params = &SpanInterfaceMockAddMessageReceiveEventParams{messageID, uncompressedByteSize, compressedByteSize}
for _, e := range mmAddMessageReceiveEvent.expectations {
if minimock.Equal(e.params, mmAddMessageReceiveEvent.defaultExpectation.params) {
mmAddMessageReceiveEvent.mock.t.Fatalf("Expectation set by When has same params: %#v", *mmAddMessageReceiveEvent.defaultExpectation.params)
}
}
return mmAddMessageReceiveEvent
}
|
Expect sets up expected params for SpanInterface.AddMessageReceiveEvent
|
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 (mmAddMessageReceiveEvent *mSpanInterfaceMockAddMessageReceiveEvent) Inspect(f func(messageID int64, uncompressedByteSize int64, compressedByteSize int64)) *mSpanInterfaceMockAddMessageReceiveEvent {
if mmAddMessageReceiveEvent.mock.inspectFuncAddMessageReceiveEvent != nil {
mmAddMessageReceiveEvent.mock.t.Fatalf("Inspect function is already set for SpanInterfaceMock.AddMessageReceiveEvent")
}
mmAddMessageReceiveEvent.mock.inspectFuncAddMessageReceiveEvent = f
return mmAddMessageReceiveEvent
}
|
Inspect accepts an inspector function that has same arguments as the SpanInterface.AddMessageReceiveEvent
|
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 (mmAddMessageReceiveEvent *mSpanInterfaceMockAddMessageReceiveEvent) Return() *SpanInterfaceMock {
if mmAddMessageReceiveEvent.mock.funcAddMessageReceiveEvent != nil {
mmAddMessageReceiveEvent.mock.t.Fatalf("SpanInterfaceMock.AddMessageReceiveEvent mock is already set by Set")
}
if mmAddMessageReceiveEvent.defaultExpectation == nil {
mmAddMessageReceiveEvent.defaultExpectation = &SpanInterfaceMockAddMessageReceiveEventExpectation{mock: mmAddMessageReceiveEvent.mock}
}
return mmAddMessageReceiveEvent.mock
}
|
Return sets up results that will be returned by SpanInterface.AddMessageReceiveEvent
|
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 (mmAddMessageReceiveEvent *mSpanInterfaceMockAddMessageReceiveEvent) Set(f func(messageID int64, uncompressedByteSize int64, compressedByteSize int64)) *SpanInterfaceMock {
if mmAddMessageReceiveEvent.defaultExpectation != nil {
mmAddMessageReceiveEvent.mock.t.Fatalf("Default expectation is already set for the SpanInterface.AddMessageReceiveEvent method")
}
if len(mmAddMessageReceiveEvent.expectations) > 0 {
mmAddMessageReceiveEvent.mock.t.Fatalf("Some expectations are already set for the SpanInterface.AddMessageReceiveEvent method")
}
mmAddMessageReceiveEvent.mock.funcAddMessageReceiveEvent = f
return mmAddMessageReceiveEvent.mock
}
|
Set uses given function f to mock the SpanInterface.AddMessageReceiveEvent 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 (mmAddMessageReceiveEvent *SpanInterfaceMock) AddMessageReceiveEventAfterCounter() uint64 {
return mm_atomic.LoadUint64(&mmAddMessageReceiveEvent.afterAddMessageReceiveEventCounter)
}
|
AddMessageReceiveEventAfterCounter returns a count of finished SpanInterfaceMock.AddMessageReceiveEvent invocations
|
AddMessageReceiveEventAfterCounter
|
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 (mmAddMessageReceiveEvent *SpanInterfaceMock) AddMessageReceiveEventBeforeCounter() uint64 {
return mm_atomic.LoadUint64(&mmAddMessageReceiveEvent.beforeAddMessageReceiveEventCounter)
}
|
AddMessageReceiveEventBeforeCounter returns a count of SpanInterfaceMock.AddMessageReceiveEvent invocations
|
AddMessageReceiveEventBeforeCounter
|
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 (mmAddMessageReceiveEvent *mSpanInterfaceMockAddMessageReceiveEvent) Calls() []*SpanInterfaceMockAddMessageReceiveEventParams {
mmAddMessageReceiveEvent.mutex.RLock()
argCopy := make([]*SpanInterfaceMockAddMessageReceiveEventParams, len(mmAddMessageReceiveEvent.callArgs))
copy(argCopy, mmAddMessageReceiveEvent.callArgs)
mmAddMessageReceiveEvent.mutex.RUnlock()
return argCopy
}
|
Calls returns a list of arguments used in each call to SpanInterfaceMock.AddMessageReceiveEvent.
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) MinimockAddMessageReceiveEventDone() bool {
for _, e := range m.AddMessageReceiveEventMock.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.AddMessageReceiveEventMock.defaultExpectation != nil && mm_atomic.LoadUint64(&m.afterAddMessageReceiveEventCounter) < 1 {
return false
}
// if func was set then invocations count should be greater than zero
if m.funcAddMessageReceiveEvent != nil && mm_atomic.LoadUint64(&m.afterAddMessageReceiveEventCounter) < 1 {
return false
}
return true
}
|
MinimockAddMessageReceiveEventDone returns true if the count of the AddMessageReceiveEvent invocations corresponds
the number of defined expectations
|
MinimockAddMessageReceiveEventDone
|
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 (mmAddMessageSendEvent *mSpanInterfaceMockAddMessageSendEvent) Expect(messageID int64, uncompressedByteSize int64, compressedByteSize int64) *mSpanInterfaceMockAddMessageSendEvent {
if mmAddMessageSendEvent.mock.funcAddMessageSendEvent != nil {
mmAddMessageSendEvent.mock.t.Fatalf("SpanInterfaceMock.AddMessageSendEvent mock is already set by Set")
}
if mmAddMessageSendEvent.defaultExpectation == nil {
mmAddMessageSendEvent.defaultExpectation = &SpanInterfaceMockAddMessageSendEventExpectation{}
}
mmAddMessageSendEvent.defaultExpectation.params = &SpanInterfaceMockAddMessageSendEventParams{messageID, uncompressedByteSize, compressedByteSize}
for _, e := range mmAddMessageSendEvent.expectations {
if minimock.Equal(e.params, mmAddMessageSendEvent.defaultExpectation.params) {
mmAddMessageSendEvent.mock.t.Fatalf("Expectation set by When has same params: %#v", *mmAddMessageSendEvent.defaultExpectation.params)
}
}
return mmAddMessageSendEvent
}
|
Expect sets up expected params for SpanInterface.AddMessageSendEvent
|
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 (mmAddMessageSendEvent *mSpanInterfaceMockAddMessageSendEvent) Inspect(f func(messageID int64, uncompressedByteSize int64, compressedByteSize int64)) *mSpanInterfaceMockAddMessageSendEvent {
if mmAddMessageSendEvent.mock.inspectFuncAddMessageSendEvent != nil {
mmAddMessageSendEvent.mock.t.Fatalf("Inspect function is already set for SpanInterfaceMock.AddMessageSendEvent")
}
mmAddMessageSendEvent.mock.inspectFuncAddMessageSendEvent = f
return mmAddMessageSendEvent
}
|
Inspect accepts an inspector function that has same arguments as the SpanInterface.AddMessageSendEvent
|
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 (mmAddMessageSendEvent *mSpanInterfaceMockAddMessageSendEvent) Return() *SpanInterfaceMock {
if mmAddMessageSendEvent.mock.funcAddMessageSendEvent != nil {
mmAddMessageSendEvent.mock.t.Fatalf("SpanInterfaceMock.AddMessageSendEvent mock is already set by Set")
}
if mmAddMessageSendEvent.defaultExpectation == nil {
mmAddMessageSendEvent.defaultExpectation = &SpanInterfaceMockAddMessageSendEventExpectation{mock: mmAddMessageSendEvent.mock}
}
return mmAddMessageSendEvent.mock
}
|
Return sets up results that will be returned by SpanInterface.AddMessageSendEvent
|
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 (mmAddMessageSendEvent *mSpanInterfaceMockAddMessageSendEvent) Set(f func(messageID int64, uncompressedByteSize int64, compressedByteSize int64)) *SpanInterfaceMock {
if mmAddMessageSendEvent.defaultExpectation != nil {
mmAddMessageSendEvent.mock.t.Fatalf("Default expectation is already set for the SpanInterface.AddMessageSendEvent method")
}
if len(mmAddMessageSendEvent.expectations) > 0 {
mmAddMessageSendEvent.mock.t.Fatalf("Some expectations are already set for the SpanInterface.AddMessageSendEvent method")
}
mmAddMessageSendEvent.mock.funcAddMessageSendEvent = f
return mmAddMessageSendEvent.mock
}
|
Set uses given function f to mock the SpanInterface.AddMessageSendEvent 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 (mmAddMessageSendEvent *SpanInterfaceMock) AddMessageSendEventAfterCounter() uint64 {
return mm_atomic.LoadUint64(&mmAddMessageSendEvent.afterAddMessageSendEventCounter)
}
|
AddMessageSendEventAfterCounter returns a count of finished SpanInterfaceMock.AddMessageSendEvent invocations
|
AddMessageSendEventAfterCounter
|
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 (mmAddMessageSendEvent *SpanInterfaceMock) AddMessageSendEventBeforeCounter() uint64 {
return mm_atomic.LoadUint64(&mmAddMessageSendEvent.beforeAddMessageSendEventCounter)
}
|
AddMessageSendEventBeforeCounter returns a count of SpanInterfaceMock.AddMessageSendEvent invocations
|
AddMessageSendEventBeforeCounter
|
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 (mmAddMessageSendEvent *mSpanInterfaceMockAddMessageSendEvent) Calls() []*SpanInterfaceMockAddMessageSendEventParams {
mmAddMessageSendEvent.mutex.RLock()
argCopy := make([]*SpanInterfaceMockAddMessageSendEventParams, len(mmAddMessageSendEvent.callArgs))
copy(argCopy, mmAddMessageSendEvent.callArgs)
mmAddMessageSendEvent.mutex.RUnlock()
return argCopy
}
|
Calls returns a list of arguments used in each call to SpanInterfaceMock.AddMessageSendEvent.
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) MinimockAddMessageSendEventDone() bool {
for _, e := range m.AddMessageSendEventMock.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.AddMessageSendEventMock.defaultExpectation != nil && mm_atomic.LoadUint64(&m.afterAddMessageSendEventCounter) < 1 {
return false
}
// if func was set then invocations count should be greater than zero
if m.funcAddMessageSendEvent != nil && mm_atomic.LoadUint64(&m.afterAddMessageSendEventCounter) < 1 {
return false
}
return true
}
|
MinimockAddMessageSendEventDone returns true if the count of the AddMessageSendEvent invocations corresponds
the number of defined expectations
|
MinimockAddMessageSendEventDone
|
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 (mmAnnotate *mSpanInterfaceMockAnnotate) Expect(attributes []mm_trace.Attribute, str string) *mSpanInterfaceMockAnnotate {
if mmAnnotate.mock.funcAnnotate != nil {
mmAnnotate.mock.t.Fatalf("SpanInterfaceMock.Annotate mock is already set by Set")
}
if mmAnnotate.defaultExpectation == nil {
mmAnnotate.defaultExpectation = &SpanInterfaceMockAnnotateExpectation{}
}
mmAnnotate.defaultExpectation.params = &SpanInterfaceMockAnnotateParams{attributes, str}
for _, e := range mmAnnotate.expectations {
if minimock.Equal(e.params, mmAnnotate.defaultExpectation.params) {
mmAnnotate.mock.t.Fatalf("Expectation set by When has same params: %#v", *mmAnnotate.defaultExpectation.params)
}
}
return mmAnnotate
}
|
Expect sets up expected params for SpanInterface.Annotate
|
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 (mmAnnotate *mSpanInterfaceMockAnnotate) Inspect(f func(attributes []mm_trace.Attribute, str string)) *mSpanInterfaceMockAnnotate {
if mmAnnotate.mock.inspectFuncAnnotate != nil {
mmAnnotate.mock.t.Fatalf("Inspect function is already set for SpanInterfaceMock.Annotate")
}
mmAnnotate.mock.inspectFuncAnnotate = f
return mmAnnotate
}
|
Inspect accepts an inspector function that has same arguments as the SpanInterface.Annotate
|
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 (mmAnnotate *mSpanInterfaceMockAnnotate) Return() *SpanInterfaceMock {
if mmAnnotate.mock.funcAnnotate != nil {
mmAnnotate.mock.t.Fatalf("SpanInterfaceMock.Annotate mock is already set by Set")
}
if mmAnnotate.defaultExpectation == nil {
mmAnnotate.defaultExpectation = &SpanInterfaceMockAnnotateExpectation{mock: mmAnnotate.mock}
}
return mmAnnotate.mock
}
|
Return sets up results that will be returned by SpanInterface.Annotate
|
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 (mmAnnotate *mSpanInterfaceMockAnnotate) Set(f func(attributes []mm_trace.Attribute, str string)) *SpanInterfaceMock {
if mmAnnotate.defaultExpectation != nil {
mmAnnotate.mock.t.Fatalf("Default expectation is already set for the SpanInterface.Annotate method")
}
if len(mmAnnotate.expectations) > 0 {
mmAnnotate.mock.t.Fatalf("Some expectations are already set for the SpanInterface.Annotate method")
}
mmAnnotate.mock.funcAnnotate = f
return mmAnnotate.mock
}
|
Set uses given function f to mock the SpanInterface.Annotate 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 (mmAnnotate *SpanInterfaceMock) AnnotateAfterCounter() uint64 {
return mm_atomic.LoadUint64(&mmAnnotate.afterAnnotateCounter)
}
|
AnnotateAfterCounter returns a count of finished SpanInterfaceMock.Annotate invocations
|
AnnotateAfterCounter
|
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 (mmAnnotate *SpanInterfaceMock) AnnotateBeforeCounter() uint64 {
return mm_atomic.LoadUint64(&mmAnnotate.beforeAnnotateCounter)
}
|
AnnotateBeforeCounter returns a count of SpanInterfaceMock.Annotate invocations
|
AnnotateBeforeCounter
|
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 (mmAnnotate *mSpanInterfaceMockAnnotate) Calls() []*SpanInterfaceMockAnnotateParams {
mmAnnotate.mutex.RLock()
argCopy := make([]*SpanInterfaceMockAnnotateParams, len(mmAnnotate.callArgs))
copy(argCopy, mmAnnotate.callArgs)
mmAnnotate.mutex.RUnlock()
return argCopy
}
|
Calls returns a list of arguments used in each call to SpanInterfaceMock.Annotate.
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) MinimockAnnotateDone() bool {
for _, e := range m.AnnotateMock.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.AnnotateMock.defaultExpectation != nil && mm_atomic.LoadUint64(&m.afterAnnotateCounter) < 1 {
return false
}
// if func was set then invocations count should be greater than zero
if m.funcAnnotate != nil && mm_atomic.LoadUint64(&m.afterAnnotateCounter) < 1 {
return false
}
return true
}
|
MinimockAnnotateDone returns true if the count of the Annotate invocations corresponds
the number of defined expectations
|
MinimockAnnotateDone
|
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 (mmAnnotatef *mSpanInterfaceMockAnnotatef) Expect(attributes []mm_trace.Attribute, format string, a ...interface{}) *mSpanInterfaceMockAnnotatef {
if mmAnnotatef.mock.funcAnnotatef != nil {
mmAnnotatef.mock.t.Fatalf("SpanInterfaceMock.Annotatef mock is already set by Set")
}
if mmAnnotatef.defaultExpectation == nil {
mmAnnotatef.defaultExpectation = &SpanInterfaceMockAnnotatefExpectation{}
}
mmAnnotatef.defaultExpectation.params = &SpanInterfaceMockAnnotatefParams{attributes, format, a}
for _, e := range mmAnnotatef.expectations {
if minimock.Equal(e.params, mmAnnotatef.defaultExpectation.params) {
mmAnnotatef.mock.t.Fatalf("Expectation set by When has same params: %#v", *mmAnnotatef.defaultExpectation.params)
}
}
return mmAnnotatef
}
|
Expect sets up expected params for SpanInterface.Annotatef
|
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 (mmAnnotatef *mSpanInterfaceMockAnnotatef) Inspect(f func(attributes []mm_trace.Attribute, format string, a ...interface{})) *mSpanInterfaceMockAnnotatef {
if mmAnnotatef.mock.inspectFuncAnnotatef != nil {
mmAnnotatef.mock.t.Fatalf("Inspect function is already set for SpanInterfaceMock.Annotatef")
}
mmAnnotatef.mock.inspectFuncAnnotatef = f
return mmAnnotatef
}
|
Inspect accepts an inspector function that has same arguments as the SpanInterface.Annotatef
|
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 (mmAnnotatef *mSpanInterfaceMockAnnotatef) Return() *SpanInterfaceMock {
if mmAnnotatef.mock.funcAnnotatef != nil {
mmAnnotatef.mock.t.Fatalf("SpanInterfaceMock.Annotatef mock is already set by Set")
}
if mmAnnotatef.defaultExpectation == nil {
mmAnnotatef.defaultExpectation = &SpanInterfaceMockAnnotatefExpectation{mock: mmAnnotatef.mock}
}
return mmAnnotatef.mock
}
|
Return sets up results that will be returned by SpanInterface.Annotatef
|
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 (mmAnnotatef *mSpanInterfaceMockAnnotatef) Set(f func(attributes []mm_trace.Attribute, format string, a ...interface{})) *SpanInterfaceMock {
if mmAnnotatef.defaultExpectation != nil {
mmAnnotatef.mock.t.Fatalf("Default expectation is already set for the SpanInterface.Annotatef method")
}
if len(mmAnnotatef.expectations) > 0 {
mmAnnotatef.mock.t.Fatalf("Some expectations are already set for the SpanInterface.Annotatef method")
}
mmAnnotatef.mock.funcAnnotatef = f
return mmAnnotatef.mock
}
|
Set uses given function f to mock the SpanInterface.Annotatef 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 (mmAnnotatef *SpanInterfaceMock) AnnotatefAfterCounter() uint64 {
return mm_atomic.LoadUint64(&mmAnnotatef.afterAnnotatefCounter)
}
|
AnnotatefAfterCounter returns a count of finished SpanInterfaceMock.Annotatef invocations
|
AnnotatefAfterCounter
|
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 (mmAnnotatef *SpanInterfaceMock) AnnotatefBeforeCounter() uint64 {
return mm_atomic.LoadUint64(&mmAnnotatef.beforeAnnotatefCounter)
}
|
AnnotatefBeforeCounter returns a count of SpanInterfaceMock.Annotatef invocations
|
AnnotatefBeforeCounter
|
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 (mmAnnotatef *mSpanInterfaceMockAnnotatef) Calls() []*SpanInterfaceMockAnnotatefParams {
mmAnnotatef.mutex.RLock()
argCopy := make([]*SpanInterfaceMockAnnotatefParams, len(mmAnnotatef.callArgs))
copy(argCopy, mmAnnotatef.callArgs)
mmAnnotatef.mutex.RUnlock()
return argCopy
}
|
Calls returns a list of arguments used in each call to SpanInterfaceMock.Annotatef.
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) MinimockAnnotatefDone() bool {
for _, e := range m.AnnotatefMock.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.AnnotatefMock.defaultExpectation != nil && mm_atomic.LoadUint64(&m.afterAnnotatefCounter) < 1 {
return false
}
// if func was set then invocations count should be greater than zero
if m.funcAnnotatef != nil && mm_atomic.LoadUint64(&m.afterAnnotatefCounter) < 1 {
return false
}
return true
}
|
MinimockAnnotatefDone returns true if the count of the Annotatef invocations corresponds
the number of defined expectations
|
MinimockAnnotatefDone
|
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 (mmEnd *mSpanInterfaceMockEnd) Expect() *mSpanInterfaceMockEnd {
if mmEnd.mock.funcEnd != nil {
mmEnd.mock.t.Fatalf("SpanInterfaceMock.End mock is already set by Set")
}
if mmEnd.defaultExpectation == nil {
mmEnd.defaultExpectation = &SpanInterfaceMockEndExpectation{}
}
return mmEnd
}
|
Expect sets up expected params for SpanInterface.End
|
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 (mmEnd *mSpanInterfaceMockEnd) Inspect(f func()) *mSpanInterfaceMockEnd {
if mmEnd.mock.inspectFuncEnd != nil {
mmEnd.mock.t.Fatalf("Inspect function is already set for SpanInterfaceMock.End")
}
mmEnd.mock.inspectFuncEnd = f
return mmEnd
}
|
Inspect accepts an inspector function that has same arguments as the SpanInterface.End
|
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 (mmEnd *mSpanInterfaceMockEnd) Return() *SpanInterfaceMock {
if mmEnd.mock.funcEnd != nil {
mmEnd.mock.t.Fatalf("SpanInterfaceMock.End mock is already set by Set")
}
if mmEnd.defaultExpectation == nil {
mmEnd.defaultExpectation = &SpanInterfaceMockEndExpectation{mock: mmEnd.mock}
}
return mmEnd.mock
}
|
Return sets up results that will be returned by SpanInterface.End
|
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 (mmEnd *mSpanInterfaceMockEnd) Set(f func()) *SpanInterfaceMock {
if mmEnd.defaultExpectation != nil {
mmEnd.mock.t.Fatalf("Default expectation is already set for the SpanInterface.End method")
}
if len(mmEnd.expectations) > 0 {
mmEnd.mock.t.Fatalf("Some expectations are already set for the SpanInterface.End method")
}
mmEnd.mock.funcEnd = f
return mmEnd.mock
}
|
Set uses given function f to mock the SpanInterface.End 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 (mmEnd *SpanInterfaceMock) EndAfterCounter() uint64 {
return mm_atomic.LoadUint64(&mmEnd.afterEndCounter)
}
|
EndAfterCounter returns a count of finished SpanInterfaceMock.End invocations
|
EndAfterCounter
|
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 (mmEnd *SpanInterfaceMock) EndBeforeCounter() uint64 {
return mm_atomic.LoadUint64(&mmEnd.beforeEndCounter)
}
|
EndBeforeCounter returns a count of SpanInterfaceMock.End invocations
|
EndBeforeCounter
|
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) MinimockEndDone() bool {
for _, e := range m.EndMock.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.EndMock.defaultExpectation != nil && mm_atomic.LoadUint64(&m.afterEndCounter) < 1 {
return false
}
// if func was set then invocations count should be greater than zero
if m.funcEnd != nil && mm_atomic.LoadUint64(&m.afterEndCounter) < 1 {
return false
}
return true
}
|
MinimockEndDone returns true if the count of the End invocations corresponds
the number of defined expectations
|
MinimockEndDone
|
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 (mmIsRecordingEvents *mSpanInterfaceMockIsRecordingEvents) Expect() *mSpanInterfaceMockIsRecordingEvents {
if mmIsRecordingEvents.mock.funcIsRecordingEvents != nil {
mmIsRecordingEvents.mock.t.Fatalf("SpanInterfaceMock.IsRecordingEvents mock is already set by Set")
}
if mmIsRecordingEvents.defaultExpectation == nil {
mmIsRecordingEvents.defaultExpectation = &SpanInterfaceMockIsRecordingEventsExpectation{}
}
return mmIsRecordingEvents
}
|
Expect sets up expected params for SpanInterface.IsRecordingEvents
|
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 (mmIsRecordingEvents *mSpanInterfaceMockIsRecordingEvents) Inspect(f func()) *mSpanInterfaceMockIsRecordingEvents {
if mmIsRecordingEvents.mock.inspectFuncIsRecordingEvents != nil {
mmIsRecordingEvents.mock.t.Fatalf("Inspect function is already set for SpanInterfaceMock.IsRecordingEvents")
}
mmIsRecordingEvents.mock.inspectFuncIsRecordingEvents = f
return mmIsRecordingEvents
}
|
Inspect accepts an inspector function that has same arguments as the SpanInterface.IsRecordingEvents
|
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 (mmIsRecordingEvents *mSpanInterfaceMockIsRecordingEvents) Return(b1 bool) *SpanInterfaceMock {
if mmIsRecordingEvents.mock.funcIsRecordingEvents != nil {
mmIsRecordingEvents.mock.t.Fatalf("SpanInterfaceMock.IsRecordingEvents mock is already set by Set")
}
if mmIsRecordingEvents.defaultExpectation == nil {
mmIsRecordingEvents.defaultExpectation = &SpanInterfaceMockIsRecordingEventsExpectation{mock: mmIsRecordingEvents.mock}
}
mmIsRecordingEvents.defaultExpectation.results = &SpanInterfaceMockIsRecordingEventsResults{b1}
return mmIsRecordingEvents.mock
}
|
Return sets up results that will be returned by SpanInterface.IsRecordingEvents
|
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 (mmIsRecordingEvents *mSpanInterfaceMockIsRecordingEvents) Set(f func() (b1 bool)) *SpanInterfaceMock {
if mmIsRecordingEvents.defaultExpectation != nil {
mmIsRecordingEvents.mock.t.Fatalf("Default expectation is already set for the SpanInterface.IsRecordingEvents method")
}
if len(mmIsRecordingEvents.expectations) > 0 {
mmIsRecordingEvents.mock.t.Fatalf("Some expectations are already set for the SpanInterface.IsRecordingEvents method")
}
mmIsRecordingEvents.mock.funcIsRecordingEvents = f
return mmIsRecordingEvents.mock
}
|
Set uses given function f to mock the SpanInterface.IsRecordingEvents 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 (mmIsRecordingEvents *SpanInterfaceMock) IsRecordingEventsAfterCounter() uint64 {
return mm_atomic.LoadUint64(&mmIsRecordingEvents.afterIsRecordingEventsCounter)
}
|
IsRecordingEventsAfterCounter returns a count of finished SpanInterfaceMock.IsRecordingEvents invocations
|
IsRecordingEventsAfterCounter
|
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 (mmIsRecordingEvents *SpanInterfaceMock) IsRecordingEventsBeforeCounter() uint64 {
return mm_atomic.LoadUint64(&mmIsRecordingEvents.beforeIsRecordingEventsCounter)
}
|
IsRecordingEventsBeforeCounter returns a count of SpanInterfaceMock.IsRecordingEvents invocations
|
IsRecordingEventsBeforeCounter
|
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) MinimockIsRecordingEventsDone() bool {
for _, e := range m.IsRecordingEventsMock.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.IsRecordingEventsMock.defaultExpectation != nil && mm_atomic.LoadUint64(&m.afterIsRecordingEventsCounter) < 1 {
return false
}
// if func was set then invocations count should be greater than zero
if m.funcIsRecordingEvents != nil && mm_atomic.LoadUint64(&m.afterIsRecordingEventsCounter) < 1 {
return false
}
return true
}
|
MinimockIsRecordingEventsDone returns true if the count of the IsRecordingEvents invocations corresponds
the number of defined expectations
|
MinimockIsRecordingEventsDone
|
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) Expect(name string) *mSpanInterfaceMockSetName {
if mmSetName.mock.funcSetName != nil {
mmSetName.mock.t.Fatalf("SpanInterfaceMock.SetName mock is already set by Set")
}
if mmSetName.defaultExpectation == nil {
mmSetName.defaultExpectation = &SpanInterfaceMockSetNameExpectation{}
}
mmSetName.defaultExpectation.params = &SpanInterfaceMockSetNameParams{name}
for _, e := range mmSetName.expectations {
if minimock.Equal(e.params, mmSetName.defaultExpectation.params) {
mmSetName.mock.t.Fatalf("Expectation set by When has same params: %#v", *mmSetName.defaultExpectation.params)
}
}
return mmSetName
}
|
Expect sets up expected params for SpanInterface.SetName
|
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 (mmSetName *mSpanInterfaceMockSetName) Inspect(f func(name string)) *mSpanInterfaceMockSetName {
if mmSetName.mock.inspectFuncSetName != nil {
mmSetName.mock.t.Fatalf("Inspect function is already set for SpanInterfaceMock.SetName")
}
mmSetName.mock.inspectFuncSetName = f
return mmSetName
}
|
Inspect accepts an inspector function that has same arguments as the SpanInterface.SetName
|
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 (mmSetName *mSpanInterfaceMockSetName) Return() *SpanInterfaceMock {
if mmSetName.mock.funcSetName != nil {
mmSetName.mock.t.Fatalf("SpanInterfaceMock.SetName mock is already set by Set")
}
if mmSetName.defaultExpectation == nil {
mmSetName.defaultExpectation = &SpanInterfaceMockSetNameExpectation{mock: mmSetName.mock}
}
return mmSetName.mock
}
|
Return sets up results that will be returned by SpanInterface.SetName
|
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 (mmSetName *mSpanInterfaceMockSetName) Set(f func(name string)) *SpanInterfaceMock {
if mmSetName.defaultExpectation != nil {
mmSetName.mock.t.Fatalf("Default expectation is already set for the SpanInterface.SetName method")
}
if len(mmSetName.expectations) > 0 {
mmSetName.mock.t.Fatalf("Some expectations are already set for the SpanInterface.SetName method")
}
mmSetName.mock.funcSetName = f
return mmSetName.mock
}
|
Set uses given function f to mock the SpanInterface.SetName 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 (mmSetName *SpanInterfaceMock) SetNameAfterCounter() uint64 {
return mm_atomic.LoadUint64(&mmSetName.afterSetNameCounter)
}
|
SetNameAfterCounter returns a count of finished SpanInterfaceMock.SetName invocations
|
SetNameAfterCounter
|
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
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.