FIRAuthApiTestsBase.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*
  2. * Copyright 2019 Google
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #import <XCTest/XCTest.h>
  17. #import <FirebaseAuth/FirebaseAuth.h>
  18. #import <FirebaseCore/FIRApp.h>
  19. #import "AuthCredentials.h"
  20. #ifdef NO_NETWORK
  21. #import "ITUIOSTestUtil.h"
  22. #endif
  23. #import <GTMSessionFetcher/GTMSessionFetcher.h>
  24. #import <GTMSessionFetcher/GTMSessionFetcherService.h>
  25. NS_ASSUME_NONNULL_BEGIN
  26. #ifdef NO_NETWORK
  27. #define SKIP_IF_ON_MOBILE_HARNESS \
  28. if ([ITUIOSTestUtil isOnMobileHarness]) { \
  29. NSLog(@"Skipping '%@' on mobile harness", NSStringFromSelector(_cmd)); \
  30. return; \
  31. }
  32. #else
  33. #define SKIP_IF_ON_MOBILE_HARNESS
  34. #endif
  35. static NSTimeInterval const kExpectationsTimeout = 10;
  36. @interface FIRAuthApiTestsBase : XCTestCase
  37. /** Sign in anonymously. */
  38. - (void)signInAnonymously;
  39. /** Sign out current account. */
  40. - (void)signOut;
  41. /** Clean up the created user for tests' future runs. */
  42. - (void)deleteCurrentUser;
  43. /** Generate fake random email address */
  44. - (NSString *)fakeRandomEmail;
  45. @end
  46. NS_ASSUME_NONNULL_END