ZendriveTest
@interface ZendriveTest : NSObject
This class contains methods that mock Zendrive’s functionality for testing purposes.
-
Use this method to test
ZendriveAccident detection integration. Works only in DEBUG mode, disabled in RELEASE mode. On invoking this method, you will get a-[ZendriveDelegateProtocol processAccidentDetected:]callback on your delegate after 5 seconds. You can look at console logs for debugging in case you do not receive the callback. If issue persists, please contact us at support@zendrive.com.Warning
While invoking this method on a simulator, make sure your are simulating location (In Simulator menu bar, select Features->Location->Apple).
Declaration
Objective-C
+ (void)raiseMockAccident:(ZendriveAccidentConfidence)confidence;Parameters
confidenceAny value from
ZendriveAccidentConfidenceenum. -
Use this method to test
ZendriveAccident detection integration. Works only in DEBUG mode, disabled in RELEASE mode.This API can be used to test multiple callbacks. You need to enable
ZendriveConfiguration.implementsMultipleAccidentCallbacksfor that. In case of multiple callbacks enabled, on invoking this method, you will get a potential accident callback on your delegate. AfterZendriveMockAccidentConfig.delayBetweenCallbacksseconds, you will get a final accident callback callback.In case only single callback is enabled by setting
ZendriveConfiguration.implementsMultipleAccidentCallbacksas NO, on invoking this method, you will get a final callback. You can look at console logs for debugging in case you do not receive the callback. If issue persists, please contact us at support@zendrive.com.Warning
While invoking this method on a simulator, make sure your are simulating location (In Simulator menu bar, select Features->Location->Apple).
Declaration
Objective-C
+ (void)raiseMockAccidentUsingConfig:(ZendriveMockAccidentConfig *)config;Parameters
configConfiguration which determines the
ZendriveAccidentInfovalues in the two callbacks.
ZendriveTest Class Reference