Last active
April 3, 2023 13:33
-
-
Save LukeSmith16/115714bc7b4173efbc90caf4fbb1a6a9 to your computer and use it in GitHub Desktop.
Example domain model with mock helper extension
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct ShoppingList: Codable { | |
let items: [String] | |
} | |
extension ShoppingList { | |
static func mock(with items: [String] = []) -> Self { | |
.init(items: items) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment