MockTDDStorage.swift 519 B

12345678910111213141516
  1. import LoopKitUI
  2. @testable import Trio
  3. struct MockTDDStorage: TDDStorage {
  4. func calculateTDD(
  5. pumpManager _: any LoopKitUI.PumpManagerUI,
  6. pumpHistory _: [Trio.PumpHistoryEvent],
  7. basalProfile _: [Trio.BasalProfileEntry]
  8. ) async throws -> Trio.TDDResult {
  9. TDDResult(total: 0, bolus: 0, tempBasal: 0, scheduledBasal: 0, weightedAverage: 0, hoursOfData: 0)
  10. }
  11. func storeTDD(_: Trio.TDDResult) async { /* skip */ }
  12. func hasSufficientTDD() async throws -> Bool { true }
  13. }