AutoMocker is a Swift framework that leverages the type system to let you easily create mocked instances of your data types.
Here's an example of how it can be used:
struct MyData {
let bool: Bool
let string: String
let integers: [Int]
}
let mocked = mock(MyData.init) // a mocked instance has been created π
For the moment, AutoMocker supports initializers that take up to 6 arguments.
Xcode 10+ & Swift 5.0
Add the following to your Podfile
:
pod "AutoMocker"
Add the following to your Cartfile
:
github "vincent-pradeilles/AutoMocker"
- Twitter: @v_pradeilles