docs/mocks.html
Contributed by @marinbenc
AutoMockable protocol or annotated with AutoMockable annotation it will…Create a class called ProtocolNameMock in which it will…
For each function:
functionCalled boolean to check if the function was calledfunctionReceivedArguments tuple to check the arguments that were passed to the functionfunctionReturnValue variable and return it when the function is called.For each variable:
class MockableServiceMock: MockableService {
//MARK: - functionWithArguments
var functionWithArgumentsCalled = false
var functionWithArgumentsReceivedArguments: (firstArgument: String, onComplete: (String)-> Void)?
//MARK: - functionWithCallback
var functionWithCallbackCalled = false
var functionWithCallbackReceivedArguments: (firstArgument: String, onComplete: (String)-> Void)?
func functionWithCallback(_ firstArgument: String, onComplete: @escaping (String)-> Void) {
functionWithCallbackCalled = true
functionWithCallbackReceivedArguments = (firstArgument: firstArgument, onComplete: onComplete)
}
...
Copyright © 2016-2021 Pixle. All rights reserved.
Generated by jazzy ♪♫ v0.14.0, a Realm project.