public void TestDiBatchSizeProvider() { String connStr = Helper.GetConnectionString("Host"); IBatchSizeProvider bsp = new DiTableBatchSizeProvider(connStr); TableBatchSizePair pair = GetTableBatchSizePair(">"); int actualBatchSize = bsp.GetBatchSize(pair.Table); Assert.AreEqual(pair.BatchSize, actualBatchSize); pair = GetTableBatchSizePair("="); actualBatchSize = bsp.GetBatchSize(pair.Table); Assert.AreEqual(0, actualBatchSize); }
public void TestDiBatchOrDefaultSizeProvider() { String connStr = Helper.GetConnectionString("Host"); IBatchSizeProvider testBsp = new DiTableOrDefaultBatchSizeProvider(connStr); IBatchSizeProvider di = new DiTableBatchSizeProvider(connStr); IBatchSizeProvider def = new DefaultBatchSizeProvider(); TableBatchSizePair pair = GetTableBatchSizePair(">"); Assert.AreEqual(testBsp.GetBatchSize(pair.Table), di.GetBatchSize(pair.Table)); pair = GetTableBatchSizePair("="); Assert.AreEqual(testBsp.GetBatchSize(pair.Table), def.GetBatchSize(pair.Table)); Debug.WriteLine("here boss"); }