상속: INotifyPropertyChanged, IDisposable
예제 #1
0
 /// <summary>
 /// Constructor.
 /// </summary>
 private SDKManager()
 {
     SdkEngine = new SdkEngine(true);
     Status    = new SdkStatus();
     _backgroundTaskManager = new BackgroundTaskManager();
     _backgroundTaskManager.RegisterOnProgressEventHandler();
 }
예제 #2
0
 public async Task TestBackendStatus()
 {
     SdkStatus status = new SdkStatus();
     Assert.IsTrue(await status.CheckResolversReachable(), "Resolver reachable failed");
     ((MockApiConnection) ServiceManager.ApiConnction).FailNetwork = true;
     try { await ServiceManager.ApiConnction.LoadSettings(); } catch (Exception) { }
     Assert.IsFalse(await status.CheckResolversReachable(), "Unreachable Resolver reachable failed");
     ((MockApiConnection) ServiceManager.ApiConnction).FailNetwork = false;
     await ServiceManager.ApiConnction.LoadSettings();
     Assert.IsTrue(await status.CheckResolversReachable(), "Resolver reachable failed");
 }
예제 #3
0
 /// <summary>
 /// Constructor.
 /// </summary>
 private SDKManager()
 {
     SdkEngine = new SdkEngine(true);
     Status = new SdkStatus();
     _backgroundTaskManager = new BackgroundTaskManager();
     _backgroundTaskManager.RegisterOnProgressEventHandler();
 }
예제 #4
0
 public async Task TestInvalidApiKeyValidation()
 {
     SdkStatus status = new SdkStatus();
     SdkConfiguration.ApiKey = "123";
     Assert.IsFalse(await status.CheckApiKeysValid(), "ApiKey is not invalid");
 }
예제 #5
0
 public async Task TestApiKeyValidation()
 {
     SdkStatus status = new SdkStatus();
     Assert.IsTrue(await status.CheckApiKeysValid(), "ApiKey is not valid");
 }