| Programista: | Avenga Czechia s.r.o (2) | ||
| Cena: | Bezpłatny | ||
| Rankingi: | 0 | ||
| Opinie: | 0 Napisać recenzję | ||
| Listy: | 0 + 1 | ||
| Punkty: | 2 + 0 ¡ | ||
| Mac App Store | |||
Opis
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.
Zrzuty ekranu
Cena
- Dziś: Bezpłatny
- Minimalna: Bezpłatny
- Maksymalna: Bezpłatny
Monitoruj ceny
Programista
- Avenga Czechia s.r.o
- Platformy: iOS Aplikacje (1) macOS Aplikacje (1)
- Listy: 0 + 1
- Punkty: 3 + 0 ¡
- Rankingi: 0
- Opinie: 0
- Zniżki: 0
- Filmy: 0
- RSS: Subskrybuj
Punkty
-
- 3,040 바람처어럼
- +1
-
- 10,877 Simon Chan
- +1
Rankingi
0 ☹️
Listy
0 ☹️
- Rubicon
Opinie
Bądź pierwszą osobą, która napisze recenzję 🌟
Dodatkowe informacje
- Wersja: 3.0.0
- Kategoria:
macOS Aplikacje›Narzędzia - System operacyjny:
macOS,macOS 13.3 i nowsze - Rozmiar:
9 Mb - Obsługiwany język:
English - Ocena treści:
4+ - Mac App Store Ocena:
0 - Zaktualizowano:
- Data wydania:
- 🌟 Udostępnij
- Mac App Store
Może ci się spodobać również
-
- TestFlight
- macOS Aplikacje: Narzędzia Przez: Apple
- Bezpłatny
- Listy: 8 + 2 Rankingi: 0 Opinie: 0
- Punkty: 7 + 781,462 (4.7) Wersja: 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 Aplikacje: Narzędzia Przez: MENGUS ARNAUD
- Bezpłatny
- Listy: 3 + 2 Rankingi: 0 Opinie: 0
- Punkty: 10 + 2,369 (4.7) Wersja: 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 Aplikacje: Narzędzia Przez: George Garside
- Bezpłatny
- Listy: 1 + 1 Rankingi: 0 Opinie: 0
- Punkty: 2 + 1,457 (4.6) Wersja: 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 Aplikacje: Narzędzia Przez: Steven Troughton-Smith
- * Bezpłatny
- Listy: 3 + 1 Rankingi: 0 Opinie: 0
- Punkty: 2 + 1,378 (4.7) Wersja: 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 Aplikacje: Narzędzia Przez: Arvindh Sukumar
- Bezpłatny
- Listy: 2 + 3 Rankingi: 0 Opinie: 0
- Punkty: 7 + 1,310 (4.5) Wersja: 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 Aplikacje: Narzędzia Przez: Anders Borum
- * Bezpłatny
- Listy: 4 + 2 Rankingi: 0 Opinie: 0
- Punkty: 12 + 1,224 (4.8) Wersja: 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 Aplikacje: Narzędzia Przez: Early Moon, LLC
- Bezpłatny
- Listy: 3 + 0 Rankingi: 0 Opinie: 0
- Punkty: 3 + 960 (4.6) Wersja: 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 Aplikacje: Narzędzia Przez: Intrepid
- Bezpłatny
- Listy: 0 + 0 Rankingi: 0 Opinie: 0
- Punkty: 5 + 706 (4.2) Wersja: 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 Aplikacje: Narzędzia Przez: Sun Apps, LLC
- Bezpłatny
- Listy: 0 + 0 Rankingi: 0 Opinie: 0
- Punkty: 1 + 501 (4.5) Wersja: 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 Aplikacje: Narzędzia Przez: Moon Technolabs Pvt Ltd
- Bezpłatny
- Listy: 1 + 2 Rankingi: 0 Opinie: 0
- Punkty: 5 + 393 (3.5) Wersja: 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 Aplikacje: Narzędzia Przez: Fun Focus Software LLC
- * Bezpłatny
- Listy: 0 + 2 Rankingi: 0 Opinie: 0
- Punkty: 3 + 382 (4.8) Wersja: 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 Aplikacje: Narzędzia Przez: Harley Thomas
- Bezpłatny
- Listy: 1 + 2 Rankingi: 0 Opinie: 0
- Punkty: 1 + 372 (4.9) Wersja: 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 ... ⥯