|
|
@ -1,8 +1,8 @@ |
|
|
|
// Copyright © 2015 Abhishek Banthia |
|
|
|
// Copyright © 2015 Abhishek Banthia |
|
|
|
|
|
|
|
|
|
|
|
import CoreModelKit |
|
|
|
import CoreModelKit |
|
|
|
import XCTest |
|
|
|
|
|
|
|
import EventKit |
|
|
|
import EventKit |
|
|
|
|
|
|
|
import XCTest |
|
|
|
|
|
|
|
|
|
|
|
@testable import Clocker |
|
|
|
@testable import Clocker |
|
|
|
|
|
|
|
|
|
|
@ -128,7 +128,6 @@ class StandardMenubarHandlerTests: XCTestCase { |
|
|
|
let menubarHandler = MenubarTitleProvider(with: store) |
|
|
|
let menubarHandler = MenubarTitleProvider(with: store) |
|
|
|
XCTAssert(menubarHandler.format(event: mockEvent) == "Mock Title in 10m", |
|
|
|
XCTAssert(menubarHandler.format(event: mockEvent) == "Mock Title in 10m", |
|
|
|
"Suffix \(menubarHandler.format(event: mockEvent)) doesn't match expectation") |
|
|
|
"Suffix \(menubarHandler.format(event: mockEvent)) doesn't match expectation") |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func testUpcomingEventHappeningWithinOneMinute() { |
|
|
|
func testUpcomingEventHappeningWithinOneMinute() { |
|
|
@ -142,7 +141,6 @@ class StandardMenubarHandlerTests: XCTestCase { |
|
|
|
let menubarHandler = MenubarTitleProvider(with: store) |
|
|
|
let menubarHandler = MenubarTitleProvider(with: store) |
|
|
|
XCTAssert(menubarHandler.format(event: mockEvent) == "Mock Title in 1m", |
|
|
|
XCTAssert(menubarHandler.format(event: mockEvent) == "Mock Title in 1m", |
|
|
|
"Suffix \(menubarHandler.format(event: mockEvent)) doesn't match expectation") |
|
|
|
"Suffix \(menubarHandler.format(event: mockEvent)) doesn't match expectation") |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func testUpcomingEventHappeningWithinSeconds() { |
|
|
|
func testUpcomingEventHappeningWithinSeconds() { |
|
|
@ -156,7 +154,6 @@ class StandardMenubarHandlerTests: XCTestCase { |
|
|
|
let menubarHandler = MenubarTitleProvider(with: store) |
|
|
|
let menubarHandler = MenubarTitleProvider(with: store) |
|
|
|
XCTAssert(menubarHandler.format(event: mockEvent) == "Mock Title starts now.", |
|
|
|
XCTAssert(menubarHandler.format(event: mockEvent) == "Mock Title starts now.", |
|
|
|
"Suffix \(menubarHandler.format(event: mockEvent)) doesn't match expectation") |
|
|
|
"Suffix \(menubarHandler.format(event: mockEvent)) doesn't match expectation") |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func testEmptyUpcomingEvent() { |
|
|
|
func testEmptyUpcomingEvent() { |
|
|
@ -169,7 +166,6 @@ class StandardMenubarHandlerTests: XCTestCase { |
|
|
|
let menubarHandler = MenubarTitleProvider(with: store) |
|
|
|
let menubarHandler = MenubarTitleProvider(with: store) |
|
|
|
XCTAssert(menubarHandler.format(event: mockEvent) == CLEmptyString, |
|
|
|
XCTAssert(menubarHandler.format(event: mockEvent) == CLEmptyString, |
|
|
|
"Suffix \(menubarHandler.format(event: mockEvent)) doesn't match expectation") |
|
|
|
"Suffix \(menubarHandler.format(event: mockEvent)) doesn't match expectation") |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func testLongUpcomingEvent() { |
|
|
|
func testLongUpcomingEvent() { |
|
|
@ -183,6 +179,5 @@ class StandardMenubarHandlerTests: XCTestCase { |
|
|
|
let menubarHandler = MenubarTitleProvider(with: store) |
|
|
|
let menubarHandler = MenubarTitleProvider(with: store) |
|
|
|
XCTAssert(menubarHandler.format(event: mockEvent) == "Really long calendar event tit... starts now.", |
|
|
|
XCTAssert(menubarHandler.format(event: mockEvent) == "Really long calendar event tit... starts now.", |
|
|
|
"Suffix \(menubarHandler.format(event: mockEvent)) doesn't match expectation") |
|
|
|
"Suffix \(menubarHandler.format(event: mockEvent)) doesn't match expectation") |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|