Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class LocalNotificationTests: XCTestCase {
- var mockLocalNotification1: LocalNotification?
- var mockLocalNotification2: LocalNotification?
- // This is the manager I use for scheduling notifications.
- // Implementation details are trivial.
- var mockLocalNotificationManager: XECALocalNotificationManagerDelegate?
- override func setUp()
- {
- super.setUp()
- let mockLocalNotificationManager = LocalNotificationManager()
- }
- override func tearDown()
- {
- super.tearDown()
- mockLocalNotificationManager = nil
- }
- // MARK: - Test Functions
- func testSuccessfulLocalNotificationScheduling()
- {
- // Given
- // I don't believe that this will work
- UserDefaults.standard.set("US", forKey: "regionCode")
- UserDefaults.standard.synchronize()
- mockLocalNotification1 = LocalNotification(toTriggerInMinutes: 1)
- mockLocalNotification2 = LocalNotification(toTriggerInMinutes: 2)
- let mockLocalNotifications = [mockLocalNotification1!, mockLocalNotification2!]
- mockLocalNotificationManager?.schedule(notifications: mockLocalNotifications)
- // When
- // ????
- // Assert
- // ????
- }
- func testPerformance() {
- // This is an example of a performance test case.
- self.measure {
- // Put the code you want to measure the time of here.
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement