public void Scanner() { var result = new Dictionary <string, string>(); DictionaryScanner.Parse(Input, result); if (result.Count != 100) { throw new InvalidOperationException($"Scanner: result.Count={result.Count}"); } }
public void ScannerWithRelevantKeys() { var result = new Dictionary <string, string>(); DictionaryScanner.Parse(Input, RelevantKeys, result); if (result.Count != 50) { throw new InvalidOperationException($"ScannerWithRelevantKeys: result.Count={result.Count}"); } }
private static void CheckParsedDictionary(string input, Dictionary <string, string> expectedResult, params string[] relevantKeys) { var actualResult = new Dictionary <string, string>(); if (relevantKeys.Length == 0) { DictionaryScanner.Parse(input, actualResult); } else { var dictionaryRelevantKeys = new DictionaryRelevantKeys(relevantKeys); dictionaryRelevantKeys.Clear(); DictionaryScanner.Parse(input, dictionaryRelevantKeys, actualResult); } DictionaryAssert.AreEqual(expectedResult, actualResult); }