public static void AssertOnResultUpdateWorks <T>(this IContinuousCorrelater <T> correlater, IEnumerable <T> collection1, IEnumerable <T> collection2) { var matchArray1 = new List <T>(); var matchArray2 = new List <T>(); correlater.OnResultUpdate += (result) => { matchArray1.AddRange(result.BestMatch1); matchArray2.AddRange(result.BestMatch2); }; var actualResult = correlater.Correlate(collection1, collection2); matchArray1.AssertAreSame(actualResult.BestMatch1, "Got wrong updates"); matchArray2.AssertAreSame(actualResult.BestMatch2, "Got wrong updates"); }
protected override CorrelaterResult <T> InternalCorrelate(ICollectionWrapper <T> collection1, ICollectionWrapper <T> collection2, CancellationToken cancellationToken = default) { return(innerCorrelater.Correlate(collection1, collection2, cancellationToken)); }