private static IProviderResultCalculationsHashProvider CreateCalcHashProvider() { IProviderResultCalculationsHashProvider calculationsHashProvider = Substitute.For <IProviderResultCalculationsHashProvider>(); calculationsHashProvider.TryUpdateCalculationResultHash(Arg.Any <ProviderResult>(), Arg.Any <int>(), Arg.Any <int>()) .Returns(true); return(calculationsHashProvider); }
private bool ResultsHaveChanged(ProviderResult providerResult, int partitionIndex, int partitionSize) { bool hasChanged = _calculationsHashProvider.TryUpdateCalculationResultHash(providerResult, partitionIndex, partitionSize); if (!hasChanged) { _logger.Verbose( $"Provider:{providerResult.Provider.Id} Spec:{providerResult.SpecificationId} results have no changes so will not be stored this time"); } return(hasChanged); }