public void DbOverrideMaxConcurrencyByServerTest(int concurrency, int totalChunks, int firstCount, int lastCount) { string tmpFile = string.Empty; MultiDbData multiData; try { (tmpFile, multiData) = GetMultiDbData(); var output = Concurrency.MaxConcurrencyByServer(multiData, concurrency); Assert.AreEqual(totalChunks, output.Count()); Assert.AreEqual(firstCount, output.First().Count()); Assert.AreEqual(lastCount, output.Last().Count()); } finally { if (File.Exists(tmpFile)) { File.Delete(tmpFile); } } }