public void Should_ReturnZeroCount_When_EmptyListProvided() { List <double> listOfData = new List <double>() { }; Assert.AreEqual(0, CustomStatistics.Count(listOfData)); }
public void Should_Count_When_ListProvided() { List <double> listOfData = new List <double>() { 10, 5, 3, 6 }; Assert.AreEqual(4, CustomStatistics.Count(listOfData)); }
private double GetValueBasedOnTypeSelection(List <double> kpiRawValue, int statisticsTypeID) { switch (statisticsTypeID) { case 1: return(CustomStatistics.Average(kpiRawValue)); case 2: return(CustomStatistics.Highest(kpiRawValue)); case 3: return(CustomStatistics.Lowest(kpiRawValue)); case 4: return(CustomStatistics.Count(kpiRawValue)); case 5: return(CustomStatistics.Sum(kpiRawValue)); default: return(0); } }