Open
Description
When code is generated it doesn’t set an access control to anything.
This raises a compiler error when both the protocol and the mock class are public/open.
For example, this protocol and class:
public protocol FooProtocol {
func bar(arg: String) -> Int
}
public class FooSpy: FooProtocol {
var invokedBar = false
var invokedBarCount = 0
var invokedBarParameters: (arg: String, Void)?
var invokedBarParametersList = [(arg: String, Void)]()
var stubbedBarResult: Int! = 0
func bar(arg: String) -> Int {
invokedBar = true
invokedBarCount += 1
invokedBarParameters = (arg, ())
invokedBarParametersList.append((arg, ()))
return stubbedBarResult
}
}
Metadata
Metadata
Assignees
Labels
No labels