public void GetSSLinesInfoTest() { try { FaultSortEngine faultSortEngine = new FaultSortEngine(); faultSortEngine.GetLinesInfoFromDb(); } catch (Exception e) { Assert.Fail(e.Message); } }
public async Task GetAllSortedMaxCurrRatiosTest() { try { DateTime startTime = DateTime.Now.AddHours(-1); DateTime endTime = startTime.AddMinutes(1); FaultSortEngine faultSortEngine = new FaultSortEngine(); faultSortEngine.GetLinesInfoFromDb(); List <Tuple <double, string, DateTime> > sortedMaxCurrRatios = await faultSortEngine.GetAllSortedMaxCurrRatios(faultSortEngine.WindowStartTime, faultSortEngine.WindowEndTime); List <double> sortedMaxCurrRatioVals = sortedMaxCurrRatios.Select(ratioTuple => ratioTuple.Item1).ToList(); // dump the results to excel string dateStr = DateTime.Now.ToString("yyyyMMddHHmmss"); ExcelUtils.DumpCurrRatioResultsToExcel(sortedMaxCurrRatios, $"E:\\sortedCurrRatios{dateStr}.xlsx"); } catch (Exception e) { Assert.Fail(e.Message); } }