//
//  UIColorTests.swift
//  Astro
//
//  Created by Mike Klemarewski on 2015-06-01.
//  Copyright (c) 2015 Mobify Research & Development Inc. All rights reserved.
//

import XCTest
@testable import Astro

class UIColorTests: AstroTestCase {

    func testCreateUIColorWithHexString() {
        let color = UIColor(hex: "#00FF00")
        AssertEqual(color, b: UIColor.green)
    }

    func testCreateUIColorWithHexStringLowerCase() {
        let color = UIColor(hex: "#00ff00")
        AssertEqual(color, b: UIColor.green)
    }

    func testCreateUIColorWithInvalidHexString() {
        let color = UIColor(hex: "not a hex string")
        AssertEqual(color, b: nil)
    }
}
