StubbedMethod
open class StubbedMethod : WithStubbingPolicy
[Internal] Allows to reduce Mock.generated.swif size, by moving part of implementation here.
-
[Internal] Returns whether there are still products to be used as stub return values
Declaration
Swift
public var isValid: Bool { get }
-
[Internal] Stubbing policy. By default uses parent mock policy
Declaration
Swift
public var policy: StubbingPolicy
-
[Internal] Creates new method init with given products.
Declaration
Swift
public init(_ products: [StubProduct])
Parameters
products
All stub return values
-
[Internal] Get next product, with respect to self.policy and inherited policy
Declaration
Swift
public func getProduct(policy: StubbingPolicy) -> StubProduct
Parameters
policy
Inherited policy
Return Value
StubProduct from products array
-
[Internal] New instance of stubber class, used to populate products array
Declaration
Swift
public func stub<T>(for type: T.Type) -> Stubber<T>
Parameters
type
Returned value type
Return Value
Stubber instance
-
[Internal] New instance of stubber class, used to populate products array
Declaration
Swift
public func stubThrows<T>(for type: T.Type) -> StubberThrows<T>
Parameters
type
Returned value type
Return Value
Stubber instance