public void Create_NullData_ThrowsArgumentNullException() { // Call TestDelegate test = () => ChartDataSeriesFactory.Create(null); // Assert Assert.Throws <ArgumentNullException>(test); }
public void Create_ChartMultipleLineData_ReturnChartMultipleLineDataSeries() { // Call IChartDataSeries series = ChartDataSeriesFactory.Create(new ChartMultipleLineData("test data")); // Assert Assert.IsInstanceOf <ChartMultipleLineDataSeries>(series); }
public void Create_OtherData_ThrowsNotSupportedException() { // Setup var testData = new TestChartData("test data"); // Call TestDelegate test = () => ChartDataSeriesFactory.Create(testData); // Assert Assert.Throws <NotSupportedException>(test); }
private void DrawChartData(ChartData chartData) { IChartDataSeries chartDataSeries = ChartDataSeriesFactory.Create(chartData); var drawnChartData = new DrawnChartData { ChartData = chartData, ChartDataSeries = chartDataSeries }; drawnChartData.Observer = new Observer(() => { drawnChartData.ChartDataSeries.Update(); plotView.InvalidatePlot(true); }) { Observable = chartData }; drawnChartDataList.Add(drawnChartData); plotView.Model.Series.Add((Series)chartDataSeries); }