EZSwiftExtensions/EZSwiftExtensionsTests/BlockButtonTests.swift

38 lines
777 B
Swift

//
// BlockButtonTests.swift
// EZSwiftExtensions
//
// Created by Valentino Urbano on 28/01/16.
// Copyright © 2016 Goktug Yilmaz. All rights reserved.
//
#if os(iOS) || os(tvOS)
import XCTest
@testable import EZSwiftExtensions
class BlockButtonTests: XCTestCase {
var blockButton: BlockButton!
override func setUp() {
super.setUp()
blockButton = BlockButton()
}
func testHighlight() {
blockButton.highlight()
guard let _ = blockButton.action else {
XCTAssertNil(blockButton.highlightLayer)
return
}
XCTAssertNotNil(blockButton.highlightLayer)
}
func testUnighlight() {
blockButton.unhighlight()
XCTAssertNil(blockButton.highlightLayer)
}
}
#endif