コード例 #1
0
        public void InvalidAxisKey()
        {
            var model = new PlotModel();

            model.Axes.Add(new LinearAxis());
            model.Series.Add(new LineSeries {
                XAxisKey = "invalidKey"
            });
            ((IPlotModel)model).Update(true);
            Assert.IsNotNull(model.GetLastPlotException() as InvalidOperationException);
        }
コード例 #2
0
ファイル: AxisTests.cs プロジェクト: am1752/StudyCSharpp
        public void D01_InvalidAbsoluteMaxMin()
        {
            var plot = new PlotModel {
                Title = "Simple plot"
            };

            plot.Axes.Add(new LinearAxis {
                AbsoluteMaximum = 0, AbsoluteMinimum = 0
            });
            ((IPlotModel)plot).Update(true);
            Assert.IsNotNull(plot.GetLastPlotException() as InvalidOperationException);
        }
コード例 #3
0
ファイル: PlotViewTests.cs プロジェクト: am1752/StudyCSharpp
        public void PlotInifityPolyline()
        {
            var model  = new PlotModel();
            var series = new OxyPlot.Series.LineSeries();

            series.Points.Add(new DataPoint(0, 0));
            series.Points.Add(new DataPoint(1, -1e40));
            model.Series.Add(series);

            var view = new PlotView {
                Model = model
            };
            var window = new Window {
                Height = 350, Width = 500, Content = view
            };

            Assert.DoesNotThrow(() => window.Show());
            Assert.IsNull(model.GetLastPlotException());
        }
コード例 #4
0
ファイル: AxisTests.cs プロジェクト: huoxudong125/oxyplot
 public void D01_InvalidAbsoluteMaxMin()
 {
     var plot = new PlotModel { Title = "Simple plot" };
     plot.Axes.Add(new LinearAxis { AbsoluteMaximum = 0, AbsoluteMinimum = 0 });
     ((IPlotModel)plot).Update(true);
     Assert.IsNotNull(plot.GetLastPlotException() as InvalidOperationException);
 }
コード例 #5
0
 public void InvalidAxisKey()
 {
     var model = new PlotModel();
     model.Axes.Add(new LinearAxis());
     model.Series.Add(new LineSeries { XAxisKey = "invalidKey" });
     ((IPlotModel)model).Update(true);
     Assert.IsNotNull(model.GetLastPlotException() as InvalidOperationException);
 }