Skip to content

Commit

Permalink
add mock data
Browse files Browse the repository at this point in the history
  • Loading branch information
Bunn committed Jul 21, 2021
1 parent 9c129af commit 334b90e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Sources/SwiftHole/Model/Summary.swift
Original file line number Diff line number Diff line change
Expand Up @@ -95,19 +95,19 @@ public struct Relative: Decodable {


extension Summary: Mockable {
static func mockData() -> Summary {
Summary(domainsBeingBlocked: 1, dnsQueriesToday: 2, adsBlockedToday: 3, adsPercentageToday: 4, uniqueDomains: 5, queriesForwarded: 6, queriesCached: 7, clientsEverSeen: 8, uniqueClients: 9, dnsQueriesAllTypes: 10, replyNODATA: 11, replyNXDOMAIN: 12, replyCNAME: 13, replyIP: 14, privacyLevel: 15, status: "enabled", gravityLastUpdated: GravityLastUpdated.mockData())
public static func mockData() -> Summary {
Summary(domainsBeingBlocked: 100, dnsQueriesToday: 2, adsBlockedToday: 3, adsPercentageToday: 4, uniqueDomains: 5, queriesForwarded: 6, queriesCached: 7, clientsEverSeen: 8, uniqueClients: 9, dnsQueriesAllTypes: 10, replyNODATA: 11, replyNXDOMAIN: 12, replyCNAME: 13, replyIP: 14, privacyLevel: 15, status: "enabled", gravityLastUpdated: GravityLastUpdated.mockData())
}
}

extension GravityLastUpdated: Mockable {
static func mockData() -> GravityLastUpdated {
public static func mockData() -> GravityLastUpdated {
GravityLastUpdated(fileExists: true, absolute: 1, relative: Relative.mockData())
}
}

extension Relative: Mockable {
static func mockData() -> Relative {
public static func mockData() -> Relative {
Relative(days: 10, hours: 11, minutes: 12)
}
}

0 comments on commit 334b90e

Please sign in to comment.