You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
752 B
35 lines
752 B
//
|
|
// Fakes.swift
|
|
// LeCountdown
|
|
//
|
|
// Created by Laurent Morvillier on 17/02/2023.
|
|
//
|
|
|
|
import Foundation
|
|
import CoreData
|
|
|
|
extension Countdown {
|
|
|
|
static func fake(context: NSManagedObjectContext) -> Countdown {
|
|
let cd = Countdown(context: context)
|
|
cd.duration = 4 * 60.0
|
|
let activity = Activity(context: context)
|
|
activity.name = "Tea"
|
|
cd.activity = activity
|
|
return cd
|
|
}
|
|
|
|
}
|
|
|
|
extension Alarm {
|
|
|
|
static func fake(context: NSManagedObjectContext) -> Alarm {
|
|
let alarm = Alarm(context: context)
|
|
alarm.fireDate = Date()
|
|
let activity = Activity(context: context)
|
|
activity.name = "Wakeup"
|
|
alarm.activity = activity
|
|
return alarm
|
|
}
|
|
|
|
}
|
|
|