public void ShouldGenerateChart() { StatisticsChartGenerator generator = new StatisticsChartGenerator(new Plotter("c:/", "png", ImageFormat.Png)); generator.RelevantStats = new string[]{"TestCount"}; generator.Process(statistics, "dummy"); }
/// <summary> /// Create a chart generator for the specified statistics using the default plotter. /// </summary> /// <param name="statistics">The statistics to include, checking their /// <see cref="StatisticsChartGenerator"/> property</param> /// <returns>The chart generator.</returns> private static StatisticsChartGenerator ChartGenerator(List<StatisticBase> statistics) { StatisticsChartGenerator chartGenerator = new StatisticsChartGenerator(); List<string> list = new List<String>(); statistics.ForEach(delegate(StatisticBase statistic) { if (statistic.GenerateGraph) { list.Add(statistic.Name); } }); chartGenerator.RelevantStats = list.ToArray(); return chartGenerator; }
public void SetUp() { statistics = new XmlDocument(); statistics.LoadXml(xml); mockPlotter= new DynamicMock(typeof(IPlotter)); chartGenerator = new StatisticsChartGenerator((IPlotter)mockPlotter.MockInstance); }