public void ValidateDiscreteStatisticsToString() { DiscreteStatistics discreteStat1 = DiscreteStatistics.GetInstance(1); DiscreteStatistics discreteStat2 = DiscreteStatistics.GetMissingInstance; Assert.AreEqual(discreteStat1.Value.ToString((IFormatProvider)null), discreteStat1.ToString()); Assert.AreEqual("Missing", discreteStat2.ToString()); }
public void ValidateStatisticsListToString() { StatisticsList statList = new StatisticsList(); GaussianStatistics gaussStat = GaussianStatistics.GetInstance(2.33, 1.256, 7); DiscreteStatistics discreteStat = DiscreteStatistics.GetInstance(1); MissingStatistics missingStat = MissingStatistics.GetInstance; statList.Add(gaussStat); statList.Add(discreteStat); statList.Add(missingStat); string statString = statList.ToString(); Assert.AreEqual(gaussStat.ToString() + ";" + discreteStat.ToString() + ";" + missingStat.ToString(), statString); }