aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firestore/Example/Tests/Util/FSTEventAccumulator.h
diff options
context:
space:
mode:
authorGravatar Michael Lehenbauer <mikelehen@gmail.com>2018-05-08 15:33:10 -0700
committerGravatar GitHub <noreply@github.com>2018-05-08 15:33:10 -0700
commit8409f21830f1282a39c4b7888972011f43d2644a (patch)
treef09e374eb38474a52ba15226f43518e9c29bd274 /Firestore/Example/Tests/Util/FSTEventAccumulator.h
parentf32e4606e0bee158be9418b050ec2a71b2777311 (diff)
Backport array contains / transform improvements from Web. (#1242)
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;