public static void ReadRepoCheck() { SQL_entity ent = new SQL_entity(); ReadRepo <T_ACQ_D> readRep = new ReadRepo <T_ACQ_D>(ent); MerchantFilterRepo <KEY_CLIENTS, REFMERCHANTS> filtRep = new MerchantFilterRepo <KEY_CLIENTS, REFMERCHANTS>(ent); DateFilterRepo <T_ACQ_D> dateFilter = new DateFilterRepo <T_ACQ_D>(ent); ChainingRepo <TEMP_ACQ_D> chainRep = new ChainingRepo <TEMP_ACQ_D>(ent); DateTime stDt = new DateTime(2016, 08, 21, 00, 00, 00); DateTime fnDt = new DateTime(2016, 08, 22, 00, 00, 00); DateTime st = new DateTime(2016, 02, 01, 00, 00, 00); DateTime fn = new DateTime(2016, 06, 01, 00, 00, 00); //48 int cnt_1 = readRep.GetByFilter <T_ACQ_D>(s => s.MERCHANT == 9294109921).Count(); //50830 int cnt_2 = dateFilter.GetByDate(stDt, fnDt).Count(); //128 int cnt_3 = filtRep.GetByMerchantFilter <T_ACQ_D>().Count(); //2042 int cnt_4 = chainRep.FilterByDate(st, fn)._result.Count(); //597 int cnt_5 = chainRep.FilterByMerchants <REFMERCHANTS>()._result.Count(); }
//>>!!! To Unit Test public static void UOWcheck() { SQL_entity ent = new SQL_entity(); UnitOfWorkGeneric uof = new UnitOfWorkGeneric(ent); //12 var a = uof.GetByDate <T_ACQ_D>(st, fn).Count(); //5 var b = uof.GetByMerchants <KEY_CLIENTS>().Count(); //10 var c = uof.MerchantListCount(); ReadRepo <KEY_CLIENTS> kkRead = new ReadRepo <KEY_CLIENTS>(ent); //5 var d = uof.GetByMerchants <KEY_CLIENTS>().Count(); uof.DeleteBySector(2); uof.SaveAll(); //4 var e = uof.GetByMerchants <KEY_CLIENTS>().Count(); EditRepo <REFMERCHANTS> rfEdit = new EditRepo <REFMERCHANTS>(ent); //10 var f = uof.MerchantListCount(); uof.DeleteByUserID(0); uof.SaveAll(); //9 var g = uof.MerchantListCount(); uof.RefreshValues(); //27 var h = uof.GetByDate <T_ACQ_D>(st, fn).Count() + uof.GetByMerchants <KEY_CLIENTS>().Count() + uof.MerchantListCount(); }