public DictionaryRegressionTester(String oldPath, String newPath) { _old = new LogDataSource <Dictionary <String, Object> >(oldPath, FileMask); _new = new LogDataSource <Dictionary <String, Object> >(newPath, FileMask); OutputWriter = new StreamWriter($"{TestName}-results.txt"); }
private async Task <RecordCatalog> Load(LogDataSource <Dictionary <String, Object> > src) { return(await Task <RecordCatalog> .Run(() => { var retVal = new RecordCatalog(); foreach (var record in src) { if (!CanFormKey(UniqueIdentifierKeys, record)) { OutputWriter.WriteLine($"Could not form unique key with elements {Stringify(UniqueIdentifierKeys, ",")} at {src.Location}"); continue; } String uniqueId = BuildKey(UniqueIdentifierKeys, record); retVal.AddRecord(uniqueId, src.Location, record); } return retVal; })); }