init(name:object:notificationCenter:)
Creates an expectation that is fulfilled when an NSNotification is posted from a specific notification center, optionally by a specific object.
Declaration
init(name notificationName: NSNotification.Name, object: Any?, notificationCenter: NotificationCenter)Parameters
- notificationName:
The notification name to watch for.
- object:
The object by which the notification must be posted, or nil if the notification can be posted by any object.
- notificationCenter:
The Notificationcenter from which the notification must be posted.