private static void TestPass() { IDataLayer dal = CreateDataLayer(); var helper = new SampleXpoImportHelper(dal, 100); helper.Import(Enumerable.Range(1, 10000)); Report(dal); }
private static void TestFail() { IDataLayer dal = CreateDataLayer(); var helper = new SampleXpoImportHelper(dal, 100); try { helper.Import(Enumerable.Range(1, 10000).Select(x => (x < 1234) ? x : x - 1)); //a duplicated entry } catch (Exception ex) { Console.WriteLine(ex.GetType().Name); } Report(dal); }