Is this your app? Claim this page to add your own description, links and contact info. It's free. →
Version
1.4.2
Size
2.63 Mb
Updated
1 month ago
Released
18 Jun 2017
Description
Swift parser + mock generator + Xcode extension
https://github.com/raptorxcz/Rubicon
Rubicon generates spys for protocol. Parsing closures is not supported. Generating methord for parent protocol is not supported.
example:
input:
protocol Car {
var name: String? { get }
var color: Int { get set }
func go()
func load(with stuff: Int, label: String)
func isFull() -> Bool
}
output:
class CarSpy: Car {
var _name: String?
var name: String? {
get {
return _name
}
}
var _color: Int!
var color: Int {
get {
return _color
}
set {
_color = newValue
}
}
struct Load {
let stuff: Int
let label: String
}
var goCount = 0
var load = [Load]()
var isFullCount = 0
var isFullReturn: Bool
init(isFullReturn: Bool) {
self.isFullReturn = isFullReturn
}
func go() {
goCount += 1
}
func load(with stuff: Int, label: String) {
let item = Load(stuff: stuff, label: label)
load.append(item)
}
func isFull() -> Bool {
isFullCount += 1
return isFullReturn
}
}
usage in tests:
let carSpy = CarSpy()
...
let a1 = carSpy.goCount == 1
let a2 = carSpy.load.count == 1
let a3 = carSpy.load[0].stuff == 2
let a4 = carSpy.load[0].label == "name"
https://github.com/raptorxcz/Rubicon
Estimates
Availability
Devices
MacDesktop
Pricing by country
| Country | Price |
|---|---|
| Canada | free |
| China | free |
| France | free |
| Germany | free |
| Italy | free |
| Netherlands | free |
| Portugal | free |
| Spain | free |
| UK | free |
| India | free |
| Japan | free |
| Poland | free |
| Russia | free |
| Turkey | free |
| USA | free |
| Korea, Republic Of | free |
| Ukraine | free |