Created
July 7, 2020 06:30
-
-
Save Kdan/668dc2b5159a3d837d9cf3771002d756 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /// A Bool indicating if the class has received any function calls. | |
| var hasReceivedCalls: Bool { get } | |
| /// Retrieve the potential calls for a given function name. | |
| /// - Parameters: | |
| /// - name: The name of the function to retrieve calls for. | |
| /// - Returns: The optional `FunctionCall` for the name provided. | |
| func calls(with name: FunctionName) -> FunctionCall? | |
| /// Log a function call with the given name and parameters. | |
| /// - Parameters: | |
| /// - name: The name of the function to log. | |
| /// - parameters: The list of parameters to add to the log. | |
| func logFunctionCall(with name: String = #function, parameters: [Any?] = []) | |
| /// Log a function call with the given name and parameters. | |
| /// - Parameters: | |
| /// - name: The name of the function to log. | |
| /// - parameters: The list of parameters to add to the log. | |
| /// - response: The response to return after logging the function call. | |
| func logAndReturn<T>(with name: String = #function, parameters: [Any?] = [], _ response: T) -> T | |
| /// Reset the function logs. | |
| func resetFunctionLog() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment