FIRTestComponents.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. // Copyright 2018 Google
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. #import <Foundation/Foundation.h>
  15. #import <FirebaseCore/FIRComponent.h>
  16. #import <FirebaseCore/FIRComponentContainer.h>
  17. #import <FirebaseCore/FIRComponentRegistrant.h>
  18. @protocol FIRComponentRegistrant;
  19. #pragma mark - Standard Component
  20. /// A test protocol to be used for container testing.
  21. @protocol FIRTestProtocol
  22. - (void)doSomething;
  23. @end
  24. /// A test class that is a component registrant.
  25. @interface FIRTestClass
  26. : NSObject <FIRTestProtocol, FIRComponentRegistrant, FIRComponentLifecycleMaintainer>
  27. @end
  28. /// A test class that is a component registrant, a duplicate of FIRTestClass.
  29. @interface FIRTestClassDuplicate
  30. : NSObject <FIRTestProtocol, FIRComponentRegistrant, FIRComponentLifecycleMaintainer>
  31. @end
  32. #pragma mark - Eager Component
  33. /// A test protocol to be used for container testing.
  34. @protocol FIRTestProtocolEagerCached
  35. - (void)doSomethingFaster;
  36. @end
  37. /// A test class that is a component registrant that provides a component requiring eager
  38. /// instantiation, and is cached for easier validation that it was instantiated.
  39. @interface FIRTestClassEagerCached
  40. : NSObject <FIRTestProtocolEagerCached, FIRComponentRegistrant, FIRComponentLifecycleMaintainer>
  41. @end
  42. #pragma mark - Cached Component
  43. /// A test protocol to be used for container testing.
  44. @protocol FIRTestProtocolCached
  45. @end
  46. /// A test class that is a component registrant that provides a component that requests to be
  47. /// cached.
  48. @interface FIRTestClassCached
  49. : NSObject <FIRTestProtocolCached, FIRComponentRegistrant, FIRComponentLifecycleMaintainer>
  50. @end