public async Task TestInternetStateListenerOnce() { InternetStateManager.AddListener(this); Assert.True(await RestFactory.instance.HasInternet()); Assert.True(await InternetStateManager.Instance(this).HasInetAsync); Assert.True(InternetStateManager.Instance(this).HasInet); Assert.True(hasInet); InternetStateManager.RemoveListener(this); }
public void Dispose() { InternetStateManager.RemoveListener(this); }