CheckResolversReachable() public method

Check for reachability of resolver.
public CheckResolversReachable ( ) : Task
return Task
コード例 #1
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");
 }