public void DoesNotCallAfterForceRefreshWhenDisposed()
 {
     _hasCalled = false;
     _service.ForceRefresh();
     Assert.True(_hasCalled);
     _hasCalled = false;
     _service.Dispose();
     _service.ForceRefresh();
     Assert.False(_hasCalled);
 }
 public void DoesNotBreakObservableChainForErrorenousResponse()
 {
     InitializeServiceAndResetObservedValues();
     Assert.False(_hasRaisedNewPaginationResult);
     _response = GetResponse(new { InvalidData = "Here be pirates" });
     _service.ForceRefresh();
     Assert.False(_hasRaisedNewPaginationResult);
     _response = GetResponse();
     _service.ForceRefresh();
     Assert.True(_hasRaisedNewPaginationResult);
 }
 public void RaisesIsRunningAndReleasesOnForceRefresh()
 {
     _isRunningEvents.Clear();
     Assert.Empty(_isRunningEvents);
     _service.ForceRefresh();
     Assert.Equal(2, _isRunningEvents.Count);
     Assert.True(_isRunningEvents[0]);  // First notification about is running
     Assert.False(_isRunningEvents[1]); // Second to indicate request is finished
 }
 public void CallsAgainOnForceRefresh()
 {
     _hasCalled = false;
     _service.ForceRefresh();
     Assert.True(_hasCalled);
 }