Skip to content

Commit

Permalink
Add generate fake method to WooShippingAddress
Browse files Browse the repository at this point in the history
  • Loading branch information
rachelmcr committed Jan 21, 2025
1 parent d5cbcde commit f7df657
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
17 changes: 17 additions & 0 deletions Fakes/Fakes/Networking.generated.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2761,6 +2761,23 @@ extension Networking.WooShippingAccountSettings {
)
}
}
extension Networking.WooShippingAddress {
/// Returns a "ready to use" type filled with fake values.
///
public static func fake() -> Networking.WooShippingAddress {
.init(
company: .fake(),
name: .fake(),
phone: .fake(),
country: .fake(),
state: .fake(),
address1: .fake(),
address2: .fake(),
city: .fake(),
postcode: .fake()
)
}
}
extension Networking.WooShippingCarrierPredefinedOptions {
/// Returns a "ready to use" type filled with fake values.
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Codegen

/// Represents an address for the WooCommerce Shipping extension.
///
public struct WooShippingAddress: Equatable {
public struct WooShippingAddress: Equatable, GeneratedFakeable {
/// The name of the company at the address.
public let company: String

Expand Down

0 comments on commit f7df657

Please sign in to comment.