-
-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d7525e1
commit 9857633
Showing
1 changed file
with
16 additions
and
19 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,24 @@ | ||
import XCTest | ||
@testable import Cheers | ||
|
||
class CheerTests: XCTestCase { | ||
|
||
override func setUp() { | ||
super.setUp() | ||
// Put setup code here. This method is called before the invocation of each test method in the class. | ||
func testImageGenerators() { | ||
let generator = ImageGenerator() | ||
XCTAssertNotNil(generator.rectangle()) | ||
XCTAssertNotNil(generator.circle()) | ||
} | ||
|
||
override func tearDown() { | ||
// Put teardown code here. This method is called after the invocation of each test method in the class. | ||
super.tearDown() | ||
} | ||
func testCheerView() { | ||
let parent = UIView() | ||
let cheerView = CheerView() | ||
parent.addSubview(cheerView) | ||
XCTAssertEqual(cheerView.config.colors.count, 7) | ||
XCTAssertFalse(cheerView.isUserInteractionEnabled) | ||
|
||
func testExample() { | ||
// This is an example of a functional test case. | ||
// Use XCTAssert and related functions to verify your tests produce the correct results. | ||
XCTAssertNil(cheerView.emitter) | ||
cheerView.start() | ||
XCTAssertNotNil(cheerView.emitter) | ||
cheerView.stop() | ||
XCTAssertNotNil(cheerView.emitter) | ||
} | ||
|
||
func testPerformanceExample() { | ||
// This is an example of a performance test case. | ||
self.measure { | ||
// Put the code you want to measure the time of here. | ||
} | ||
} | ||
|
||
} |