Created
January 8, 2015 19:00
-
-
Save michaeleisel/6ef360c047c0d74399e1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// MainControllerTests.swift | |
// Inhale | |
// | |
// Created by Michael Eisel on 1/7/15. | |
// Copyright (c) 2015 Fredrik Krafft. All rights reserved. | |
// | |
import XCTest | |
class MainControllerTests: XCTestCase { | |
var controller: MainController | |
override func setUp() { | |
super.setUp() | |
controller = UIStoryboard.instantiateViewControllerWithClass(MainController) as MainController | |
controller.graphStartDate = NSDate() | |
controller.graphEndDate = controller.graphStartDate + 2.hour | |
} | |
func testXValueForDate() { | |
threeQuartersDate = controller.graphEndDate - (controller.graphEndDate - controller.graphStartDate) * 0.25 | |
XCTAssertEqual(controller.xValueForDate(threeQuartersDate), 0.75 * controller.graphView.width) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment