@@ -21,7 +21,7 @@ class NotificationExpectationsTestCase: XCTestCase {
21
21
func test_observeNotificationWithName_passes( ) {
22
22
let notificationName = " notificationWithNameTest "
23
23
expectation ( forNotification: notificationName, object: nil )
24
- NotificationCenter . defaultCenter ( ) . postNotificationName ( Notification . Name ( rawValue: notificationName) , object: nil )
24
+ NotificationCenter . default . postNotificationName ( Notification . Name ( rawValue: notificationName) , object: nil )
25
25
waitForExpectations ( timeout: 0.0 )
26
26
}
27
27
@@ -31,7 +31,7 @@ class NotificationExpectationsTestCase: XCTestCase {
31
31
let notificationName = " notificationWithNameAndObjectTest "
32
32
let dummyObject = NSObject ( )
33
33
expectation ( forNotification: notificationName, object: dummyObject)
34
- NotificationCenter . defaultCenter ( ) . postNotificationName ( Notification . Name ( rawValue: notificationName) , object: dummyObject)
34
+ NotificationCenter . default . postNotificationName ( Notification . Name ( rawValue: notificationName) , object: dummyObject)
35
35
waitForExpectations ( timeout: 0.0 )
36
36
}
37
37
@@ -41,7 +41,7 @@ class NotificationExpectationsTestCase: XCTestCase {
41
41
let notificationName = " notificationWithNameAndObject_expectNoObjectTest "
42
42
expectation ( forNotification: notificationName, object: nil )
43
43
let dummyObject = NSObject ( )
44
- NotificationCenter . defaultCenter ( ) . postNotificationName ( Notification . Name ( rawValue: notificationName) , object: dummyObject)
44
+ NotificationCenter . default . postNotificationName ( Notification . Name ( rawValue: notificationName) , object: dummyObject)
45
45
waitForExpectations ( timeout: 0.0 )
46
46
}
47
47
@@ -50,7 +50,7 @@ class NotificationExpectationsTestCase: XCTestCase {
50
50
// CHECK: Test Case 'NotificationExpectationsTestCase.test_observeNotificationWithIncorrectName_fails' failed \(\d+\.\d+ seconds\).
51
51
func test_observeNotificationWithIncorrectName_fails( ) {
52
52
expectation ( forNotification: " expectedName " , object: nil )
53
- NotificationCenter . defaultCenter ( ) . postNotificationName ( Notification . Name ( rawValue: " actualName " ) , object: nil )
53
+ NotificationCenter . default . postNotificationName ( Notification . Name ( rawValue: " actualName " ) , object: nil )
54
54
waitForExpectations ( timeout: 0.1 )
55
55
}
56
56
@@ -62,7 +62,7 @@ class NotificationExpectationsTestCase: XCTestCase {
62
62
let dummyObject : NSString = " dummyObject "
63
63
let anotherDummyObject = NSObject ( )
64
64
expectation ( forNotification: notificationName, object: dummyObject)
65
- NotificationCenter . defaultCenter ( ) . postNotificationName ( Notification . Name ( rawValue: notificationName) , object: anotherDummyObject)
65
+ NotificationCenter . default . postNotificationName ( Notification . Name ( rawValue: notificationName) , object: anotherDummyObject)
66
66
waitForExpectations ( timeout: 0.1 )
67
67
}
68
68
0 commit comments