MCPcopy
hub / github.com/stretchr/testify / Once

Method Once

mock/mock.go:132–134  ·  view source on GitHub ↗

Once indicates that the mock should only return the value once. Mock.On("MyMethod", arg1, arg2).Return(returnArg1, returnArg2).Once()

()

Source from the content-addressed store, hash-verified

130//
131// Mock.On("MyMethod", arg1, arg2).Return(returnArg1, returnArg2).Once()
132func (c *Call) Once() *Call {
133 return c.Times(1)
134}
135
136// Twice indicates that the mock should only return the value twice.
137//

Calls 1

TimesMethod · 0.95