Skip to content

Commit 52bf614

Browse files
test: add coverage for logscreen methods (#440)
* remove duplicate in protocol * workaround for using mock executor * switch nil check to empty check * expose methods to be tested to swift * fully covered logScreen methods * removed nil check * remove check for nil timestamp MPEvent timestamp property is not an optional * fully covered logScreenEvent method * removed duplicated lines by pulling variables out * pull dataPlanFilter to variable * created function for recievedMessage check * pull out exception to var * final adjustments to clean up * remove lazy vars Co-Authored-By: denischilik <[email protected]> --------- Co-authored-by: denischilik <[email protected]>
1 parent 2cf9bb2 commit 52bf614

File tree

5 files changed

+313
-293
lines changed

5 files changed

+313
-293
lines changed

UnitTests/MParticle+PrivateMethods.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
- (void)logEvent:(MPBaseEvent *)event;
1818
- (void)logCustomEvent:(MPEvent *)event;
1919
- (void)logKitBatch:(NSString *)batch;
20+
- (void)logScreenEvent:(MPEvent *)event;
21+
- (void)logScreen:(NSString *)screenName eventInfo:(NSDictionary<NSString *, id> *)eventInfo;
22+
- (void)logScreen:(NSString *)screenName eventInfo:(NSDictionary<NSString *, id> *)eventInfo shouldUploadEvent:(BOOL)shouldUploadEvent;
2023
- (void)logScreenCallback:(MPEvent *)event execStatus:(MPExecStatus)execStatus;
2124
- (void)leaveBreadcrumbCallback:(MPEvent *)event execStatus:(MPExecStatus)execStatus;
2225
- (void)logErrorCallback:(NSDictionary<NSString *,id> * _Nullable)eventInfo execStatus:(MPExecStatus)execStatus message:(NSString *)message;

0 commit comments

Comments
 (0)