Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mock ¶
type Mock interface { // Disable disable the mock, so interactions will be with real objects Disable() // Enable restore the mock Enable() // Verify fails the test if a call with the specified arguments wasn't made Verify(in ...interface{}) // With configures the mock to respond to the specified arguments With(values ...interface{}) Stub }
Mock contains methods to mock a call with specified arguments, and verify it
func MockMethod ¶
MockMethod creates a new Mock to mock an instance method
func MockMethodForAll ¶
MockMethodForAll creates a new Mock to mock the method for any instance of the specified type
type Stub ¶
type Stub interface { // CallRealMethod makes sure that the mock perform a call to the real method CallRealMethod() // Return makes sure the mock to return the specified values Return(values ...interface{}) // ReturnDefaults makes sure the mock to return the default outputs (zero values) ReturnDefaults() }
Stub contains method to mock a specific method
Source Files ¶
- arguments_match.go
- calls_index.go
- calls_match.go
- can_be_nil.go
- convert_to_values_and_verifies.go
- default_func_output.go
- find_call.go
- instance_mock.go
- interfaces_array_to_values_array.go
- mock.go
- mock_func.go
- mock_guard.go
- mock_manager.go
- mock_method.go
- mock_method_for_all.go
- stub.go
- stub_builder.go
- verify_values.go
Click to show internal directories.
Click to hide internal directories.