| Разработчик: | Avenga Czechia s.r.o (2) | ||
| Цена: | Бесплатно | ||
| Рейтинги: | 0 | ||
| Отзывы: | 0 Написать отзыв | ||
| Списки: | 0 + 1 | ||
| Очки: | 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.
Скриншоты
Цена
- Сегодня: Бесплатно
- Минимум: Бесплатно
- Максимум: Бесплатно
Отслеживайте цены
Разработчик
- Avenga Czechia s.r.o
- Платформы: iOS Приложения (1) macOS Приложения (1)
- Списки: 0 + 1
- Очки: 3 + 0 ¡
- Рейтинги: 0
- Отзывы: 0
- Скидки: 0
- Видео: 0
- RSS: Подписаться
Очки
-
- 3,040 바람처어럼
- +1
-
- 10,877 Simon Chan
- +1
Рейтинги
0 ☹️
Списки
0 ☹️
- Rubicon
Отзывы
Ваш отзыв будет первым 🌟
Дополнительная информация
- Версия: 3.0.0
- Категория:
macOS Приложения›Инструменты разработчика - Операционные системы:
macOS,macOS 13.3 и выше - Размер:
9 Mb - Поддерживаемые языки:
English - Возрастные ограничения:
4+ - Mac App Store Рейтинг:
0 - Обновлено:
- Дата выпуска:
- 🌟 Поделиться
- Mac App Store
Вам также могут понравиться
-
- TestFlight
- macOS Приложения: Инструменты разработчика От: Apple
- Бесплатно
- Списки: 8 + 2 Рейтинги: 0 Отзывы: 0
- Очки: 7 + 781,462 (4.7) Версия: 4.1.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 Toolbox
- macOS Приложения: Инструменты разработчика От: MENGUS ARNAUD
- Бесплатно
- Списки: 3 + 2 Рейтинги: 0 Отзывы: 0
- Очки: 10 + 2,369 (4.7) Версия: 30.9 Whether you re on the go or at your desk, WebSSH keeps you connected anytime, anywhere! ٩(^ ^)۶ WebSSH is a powerful and user-friendly SSH, SFTP, Telnet, and Port Forwarding client for ⥯
-
- Bluetooth Inspector
- macOS Приложения: Инструменты разработчика От: George Garside
- Бесплатно
- Списки: 1 + 1 Рейтинги: 0 Отзывы: 0
- Очки: 2 + 1,457 (4.6) Версия: 1.7.5 Discover nearby Bluetooth peripherals and inspect their services for information and characteristics. View information and signal strength for all peripherals and devices, updating in ... ⥯
-
- Pastel
- macOS Приложения: Инструменты разработчика От: Steven Troughton-Smith
- * Бесплатно
- Списки: 3 + 1 Рейтинги: 0 Отзывы: 0
- Очки: 2 + 1,378 (4.7) Версия: 2.4.4 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. ⥯
-
- HTTPBot: API & HTTP Client
- macOS Приложения: Инструменты разработчика От: Arvindh Sukumar
- Бесплатно
- Списки: 2 + 3 Рейтинги: 0 Отзывы: 0
- Очки: 7 + 1,310 (4.5) Версия: 2026.0.1 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 ... ⥯
-
- SSH Client - Secure ShellFish
- macOS Приложения: Инструменты разработчика От: Anders Borum
- * Бесплатно
- Списки: 4 + 2 Рейтинги: 0 Отзывы: 0
- Очки: 12 + 1,224 (4.8) Версия: 2026.6 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 + 960 (4.6) Версия: 1.30.0 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 + 706 (4.2) Версия: 26.0.0 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 ... ⥯
-
- Resolutioner
- macOS Приложения: Инструменты разработчика От: Sun Apps, LLC
- Бесплатно
- Списки: 0 + 0 Рейтинги: 0 Отзывы: 0
- Очки: 1 + 501 (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 ... ⥯
-
- SSH Client - Terminal, Telnet
- macOS Приложения: Инструменты разработчика От: Moon Technolabs Pvt Ltd
- Бесплатно
- Списки: 1 + 2 Рейтинги: 0 Отзывы: 0
- Очки: 5 + 393 (3.5) Версия: 4.9.4 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 + 382 (4.8) Версия: 6.5.0 DetailsPro is a design tool made for Apple designers and SwiftUI. Create with SwiftUI views like VStack, Text, Image, and more Make real designs without writing any code Export to ... ⥯
-
- Interactful
- macOS Приложения: Инструменты разработчика От: Harley Thomas
- Бесплатно
- Списки: 1 + 2 Рейтинги: 0 Отзывы: 0
- Очки: 1 + 372 (4.9) Версия: 6.0.2 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 ... ⥯