aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firestore/Example/Tests/Util/FSTEventAccumulator.h
diff options
context:
space:
mode:
Diffstat (limited to 'Firestore/Example/Tests/Util/FSTEventAccumulator.h')
-rw-r--r--Firestore/Example/Tests/Util/FSTEventAccumulator.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/Firestore/Example/Tests/Util/FSTEventAccumulator.h b/Firestore/Example/Tests/Util/FSTEventAccumulator.h
index baa501b..58b802b 100644
--- a/Firestore/Example/Tests/Util/FSTEventAccumulator.h
+++ b/Firestore/Example/Tests/Util/FSTEventAccumulator.h
@@ -25,15 +25,21 @@ NS_ASSUME_NONNULL_BEGIN
typedef void (^FSTValueEventHandler)(id _Nullable, NSError *_Nullable error);
-@interface FSTEventAccumulator : NSObject
+@interface FSTEventAccumulator <EventType> : NSObject
+ (instancetype)accumulatorForTest:(XCTestCase *)testCase;
- (instancetype)init NS_UNAVAILABLE;
-- (id)awaitEventWithName:(NSString *)name;
+- (EventType)awaitEventWithName:(NSString *)name;
-- (NSArray<id> *)awaitEvents:(NSUInteger)events name:(NSString *)name;
+- (NSArray<EventType> *)awaitEvents:(NSUInteger)events name:(NSString *)name;
+
+/** Waits for a latency compensated local snapshot. */
+- (EventType)awaitLocalEvent;
+
+/** Waits for a snapshot that has no pending writes */
+- (EventType)awaitRemoteEvent;
@property(nonatomic, strong, readonly) FSTValueEventHandler valueEventHandler;