public async Task SinceDatesAreNotUpdatedWhenUpdateThrows() { var entities = creteEntitiesList(at); var observables = createObservables(entities); internalState.Start(Arg.Any <IFetchObservables>()).Returns(Observable.Throw <ITransition>(new TestException())); try { await state.Start(observables).SingleAsync(); } catch (TestException) { } sinceParameterRepository.DidNotReceiveWithAnyArgs().Set <IDatabaseTestModel>(null); }
public void SinceDatesAreNotUpdatedWhenBatchUpdateThrows() { var oldSinceParameters = new SinceParameters(null, at); var entities = CreateComplexListWhereTheLastUpdateEntityIsDeleted(at); var observables = CreateObservables(oldSinceParameters, entities); setupBatchUpdateToThrow(new TestException()); try { state.Start(observables).SingleAsync().Wait(); } catch (TestException) { } sinceParameterRepository.DidNotReceiveWithAnyArgs().Set(null); }