开发人员: | Avenga Czechia s.r.o (2) | ||
价格: | 免费 | ||
排名: | 0 | ||
评价: | 0 我要评价 | ||
列表: | 1 + 0 | ||
积分: | 2 + 0 ¡ | ||
Mac App Store |
说明

https://github.com/raptorxcz/Rubicon
Rubicon generates spys, stub, mocks and dummies for protocols. Generating methods for parent protocol is not supported.
example:
input:
protocol Car {
var name: String? { get }
var color: Int { get set }
@MainActor
func go()
func load(with stuff: Int, label: String) throws -> Int
func isFull() -> Bool
func download() async throws -> [String]
}
output:
spy:
final class CarSpy: Car {
struct Load {
let stuff: Int
let label: String
}
var name: String?
var color: Int
var loadThrowBlock: () -> Void?
var loadReturn: Int
var isFullReturn: Bool
var downloadThrowBlock: () -> Void?
var downloadReturn: [String]
var goCount = 0
var load = [Load]()
var isFullCount = 0
var downloadCount = 0
init(color: Int, loadReturn: Int, isFullReturn: Bool, downloadReturn: [String]) {
self.color = color
self.loadReturn = loadReturn
self.isFullReturn = isFullReturn
self.downloadReturn = downloadReturn
}
func go() {
goCount += 1
}
func load(with stuff: Int, label: String) throws -> Int {
let item = Load(stuff: stuff, label: label)
load.append(item)
try loadThrowBlock?()
return loadReturn
}
func isFull() -> Bool {
isFullCount += 1
return isFullReturn
}
func download() async throws -> [String] {
downloadCount += 1
try downloadThrowBlock?()
return downloadReturn
}
}
stub:
final class CarStub: Car {
var name: String?
var color: Int
var loadThrowBlock: () -> Void?
var loadReturn: Int
var isFullReturn: Bool
var downloadThrowBlock: () -> Void?
var downloadReturn: [String]
init(color: Int, loadReturn: Int, isFullReturn: Bool, downloadReturn: [String]) {
self.color = color
self.loadReturn = loadReturn
self.isFullReturn = isFullReturn
self.downloadReturn = downloadReturn
}
func go() {
}
func load(with stuff: Int, label: String) throws -> Int {
try loadThrowBlock?()
return loadReturn
}
func isFull() -> Bool {
return isFullReturn
}
func download() async throws -> [String] {
try downloadThrowBlock?()
return downloadReturn
}
}
dummy:
final class CarDummy: Car {
var name: String? {
get {
fatalError()
}
}
var color: Int {
get {
fatalError()
}
set {
fatalError()
}
}
func go() {
fatalError()
}
func load(with stuff: Int, label: String) throws -> Int {
fatalError()
}
func isFull() -> Bool {
fatalError()
}
func download() async throws -> [String] {
fatalError()
}
}
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
Xcode extension
Xcode extension can generate test doubles for all or just selected protocols in the current file. The resulting test double can be written to the source file or pasteboard.
屏幕截图





价格
- 今天: 免费
- 最小值: 免费
- 最大值: 免费
可选
开发人员
积分
-
- 1,590 바람처어럼
- +1
-
- 9,751 Simon Chan
- +1
排名
未找到 ☹️
列表
评价
抢先评价一下吧 🌟
其他信息
您可能还喜欢
-
- TestFlight
- macOS 应用: 软件开发工具 来自: Apple
- 免费
- 列表: 9 + 1 排名: 0 评价: 0
- 积分: 7 + 772,441 (4.7) 版本: 3.9.0 TestFlight makes it easy to test beta versions of apps and App Clips to provide valuable feedback to developers before they release their apps on the App Store. Developers can invite ... ⥯
-
- WebSSH - SysAdmin Tools
- macOS 应用: 软件开发工具 来自: MENGUS ARNAUD
- 免费
- 列表: 3 + 2 排名: 0 评价: 0
- 积分: 10 + 2,234 (4.7) 版本: 29.9 WebSSH is an awesome SSH, SFTP, TELNET and Port Forwarding client ٩(^ ^)۶ Wherever you are it will be useful to you everywhere, all the time! SSH Functionalities ๏ Authentication using ⥯
-
- Bluetooth Inspector
- macOS 应用: 软件开发工具 来自: George Garside
- 免费
- 列表: 2 + 0 排名: 0 评价: 0
- 积分: 2 + 1,369 (4.6) 版本: 1.7.2 Discover nearby Bluetooth peripherals and inspect their services for information and characteristics. View information and signal strength for all peripherals and devices, updating in ... ⥯
-
- HTTPBot: API & HTTP Client
- macOS 应用: 软件开发工具 来自: Arvindh Sukumar
- * 免费
- 列表: 3 + 2 排名: 0 评价: 0
- 积分: 7 + 1,300 (4.5) 版本: 2025.3.2 HTTPBot is a powerful API client and debugger that lets you send HTTP/HTTPs requests, connect to WebSockets, inspect JSON & HTML responses, and debug APIs on the go. With HTTPBot, you ... ⥯
-
- Pastel
- macOS 应用: 软件开发工具 来自: Steven Troughton-Smith
- 免费
- 列表: 3 + 1 排名: 0 评价: 0
- 积分: 2 + 1,294 (4.7) 版本: 2.3.7 Capture and collect color palettes with Pastel! Pastel is an app for amateur developers & artists (like us!) that lets you build up a library of color palettes to use in your projects. ⥯
-
- SSH Files – Secure ShellFish
- macOS 应用: 软件开发工具 来自: Anders Borum
- 免费
- 列表: 4 + 2 排名: 0 评价: 0
- 积分: 10 + 1,073 (4.8) 版本: 2025.22 Lightning fast SSH terminal with remote file access. No other app fuses your SSH servers and iOS devices as well as Secure ShellFish. Tap Get and see for yourself. Terminal supports ... ⥯
-
- ServerCat - SSH Terminal
- macOS 应用: 软件开发工具 来自: Early Moon, LLC
- 免费
- 列表: 3 + 0 排名: 0 评价: 0
- 积分: 3 + 930 (4.6) 版本: 1.20 ServerCat is a Linux monitor and Docker Management & SSH Terminal app. ServerCat makes it easy to monitor your server status on your mobile. It shows detail running status of your ... ⥯
-
- HTML Editor
- macOS 应用: 软件开发工具 来自: Intrepid
- 免费
- 列表: 0 + 0 排名: 0 评价: 0
- 积分: 5 + 549 (4.2) 版本: 2.9 HTML Editor is a lightweight HTML editor complete with syntax highlighting, focused code completion suggestions and a live preview panel. With HTML Editor, you can open any existing ... ⥯
-
- Termux - iSH, SFTP, SSH Client
- macOS 应用: 软件开发工具 来自: Moon Technolabs Pvt Ltd
- 免费
- 列表: 1 + 2 排名: 0 评价: 0
- 积分: 5 + 386 (3.5) 版本: 4.8.9 Here is one of the most intelligent & advanced SSH Client apps to manage and connect remote servers for your iOS and Mac devices About SSH Client: SSH Client is an on-the-go SSH-Telnet ⥯
-
- DetailsPro
- macOS 应用: 软件开发工具 来自: Fun Focus Software LLC
- 免费
- 列表: 0 + 2 排名: 0 评价: 0
- 积分: 3 + 384 (4.8) 版本: 5.8.0 App Store featured in Great on iPad and Must-Have Apps DetailsPro is the visual design tool that brings your app ideas to life no coding required. - Mock up a new app idea in minutes - ⥯
-
- Interactful
- macOS 应用: 软件开发工具 来自: Harley Thomas
- 免费
- 列表: 1 + 2 排名: 0 评价: 0
- 积分: 1 + 351 (4.9) 版本: 5.1.1 An interactive guide for SwiftUI to help designers and developers build better apps. Code snippets and interactive examples for components like Sliders, Toggles, Lists, and Grids ... ⥯
-
- Resolutioner
- macOS 应用: 软件开发工具 来自: Sun Apps, LLC
- 免费
- 列表: 0 + 0 排名: 0 评价: 0
- 积分: 1 + 350 (4.5) 版本: 1.0 Resolutioner is a simple utility app for calculating resolutions, aspect ratios, and saving resolutions for future reference. The resolution calculator helps you to calculate a ... ⥯