FBNotificationsHelper.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /**
  2. * Copyright (c) 2015-present, Facebook, Inc.
  3. * All rights reserved.
  4. *
  5. * This source code is licensed under the BSD-style license found in the
  6. * LICENSE file in the root directory of this source tree. An additional grant
  7. * of patent rights can be found in the PATENTS file in the same directory.
  8. */
  9. #import <XCTest/XCTest.h>
  10. NS_ASSUME_NONNULL_BEGIN
  11. @interface FBNotificationsHelper : NSObject
  12. /**
  13. Creates an expectation that is fulfilled when an expected NSNotification is received
  14. @param name The name of the awaited notification
  15. @param timeout The maximum amount of float seconds to wait for the expectation
  16. @return The appropriate waiter result
  17. */
  18. + (XCTWaiterResult)waitForNotificationWithName:(NSNotificationName)name
  19. timeout:(NSTimeInterval)timeout;
  20. /**
  21. Creates an expectation that is fulfilled when an expected Darwin notification is received
  22. @param name The name of the awaited notification
  23. @param timeout The maximum amount of float seconds to wait for the expectation
  24. @return The appropriate waiter result
  25. */
  26. + (XCTWaiterResult)waitForDarwinNotificationWithName:(NSString *)name
  27. timeout:(NSTimeInterval)timeout;
  28. @end
  29. NS_ASSUME_NONNULL_END