From 334b90e7fdc5247cb34b21893db842b7db8b5ef8 Mon Sep 17 00:00:00 2001 From: Fernando Bunn Date: Wed, 21 Jul 2021 19:04:35 +0100 Subject: [PATCH] add mock data --- Sources/SwiftHole/Model/Summary.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Sources/SwiftHole/Model/Summary.swift b/Sources/SwiftHole/Model/Summary.swift index f22d7bf..0e40eb1 100644 --- a/Sources/SwiftHole/Model/Summary.swift +++ b/Sources/SwiftHole/Model/Summary.swift @@ -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) } }