@@ -11,7 +11,7 @@ import KeyboardHelper
11
11
12
12
class KeyboardAppearanceInfoTests : XCTestCase {
13
13
14
- var apperanceInfo : KeyboardAppearanceInfo !
14
+ var appearanceInfo : KeyboardAppearanceInfo !
15
15
var defaultsAppearanceInfo : KeyboardAppearanceInfo !
16
16
17
17
override func setUp( ) {
@@ -33,42 +33,43 @@ class KeyboardAppearanceInfoTests: XCTestCase {
33
33
34
34
// Fake the notification
35
35
let note = Notification ( name: NSNotification . Name. UIKeyboardWillShow, object: nil , userInfo: testUserInfo)
36
- apperanceInfo = KeyboardAppearanceInfo ( notification: note)
36
+ appearanceInfo = KeyboardAppearanceInfo ( notification: note)
37
37
let defaultNote = Notification ( name: NSNotification . Name. UIKeyboardWillShow, object: nil , userInfo: nil )
38
38
defaultsAppearanceInfo = KeyboardAppearanceInfo ( notification: defaultNote)
39
39
}
40
40
41
41
func testBeginFrame( ) {
42
- XCTAssertEqual ( apperanceInfo . beginFrame, CGRect ( x: 100 , y: 100 , width: 100 , height: 100 ) ,
42
+ XCTAssertEqual ( appearanceInfo . beginFrame, CGRect ( x: 100 , y: 100 , width: 100 , height: 100 ) ,
43
43
" Parsing beginFrame from keyboard appearance info failed. " )
44
44
XCTAssertEqual ( defaultsAppearanceInfo. beginFrame, CGRect . zero,
45
45
" Parsing default beginFrame from keyboard appearance info failed. " )
46
46
}
47
47
48
48
func testEndFrame( ) {
49
- XCTAssertEqual ( apperanceInfo . endFrame, CGRect ( x: 200 , y: 200 , width: 200 , height: 200 ) ,
49
+ XCTAssertEqual ( appearanceInfo . endFrame, CGRect ( x: 200 , y: 200 , width: 200 , height: 200 ) ,
50
50
" Parsing endFrame from keyboard appearance info failed. " )
51
51
XCTAssertEqual ( defaultsAppearanceInfo. endFrame, CGRect . zero,
52
52
" Parsing default endFrame from keyboard appearance info failed. " )
53
53
}
54
54
55
55
@available ( iOS 9 . 0 , * )
56
56
func testBelongsToCurrentApp( ) {
57
- XCTAssertEqual ( apperanceInfo . belongsToCurrentApp, false ,
57
+ XCTAssertEqual ( appearanceInfo . belongsToCurrentApp, false ,
58
58
" Parsing belongsToCurrentApp from keyboard appearance info failed. " )
59
59
XCTAssertEqual ( defaultsAppearanceInfo. belongsToCurrentApp, true ,
60
60
" Parsing default belongsToCurrentApp from keyboard appearance info failed. " )
61
61
}
62
62
63
63
func testAnimationDuration( ) {
64
- XCTAssertEqual ( apperanceInfo. animationDuration, Double ( 3 ) ,
64
+
65
+ XCTAssertEqual ( appearanceInfo. animationDuration, Double ( 3 ) ,
65
66
" Parsing animationDuration from keyboard appearance info failed. " )
66
67
XCTAssertEqual ( defaultsAppearanceInfo. animationDuration, Double ( 0.25 ) ,
67
68
" Parsing default animationDuration from keyboard appearance info failed. " )
68
69
}
69
70
70
71
func testAnimationCurve( ) {
71
- XCTAssertEqual ( apperanceInfo . animationCurve, UIViewAnimationCurve ( rawValue: 2 ) ,
72
+ XCTAssertEqual ( appearanceInfo . animationCurve, UIViewAnimationCurve ( rawValue: 2 ) ,
72
73
" Parsing animationCurve from keyboard appearance info failed. " )
73
74
XCTAssertEqual ( defaultsAppearanceInfo. animationCurve, UIViewAnimationCurve ( rawValue: defaultsAppearanceInfo. animationCurve. rawValue) ,
74
75
" Parsing default animationCurve from keyboard appearance info failed. " )
@@ -77,7 +78,7 @@ class KeyboardAppearanceInfoTests: XCTestCase {
77
78
func testAnimateAlong( ) {
78
79
let expectation = self . expectation ( description: " Animate along should take 3 seconds " )
79
80
80
- apperanceInfo . animateAlong ( { ( ) -> Void in
81
+ appearanceInfo . animateAlong ( { ( ) -> Void in
81
82
// Do animations
82
83
} ) { ( finished) -> Void in
83
84
if finished {
0 commit comments