Ejemplo n.º 1
0
        public void LineChartControlConstructorTest()
        {
            LineChartControl target = new LineChartControl();

            Assert.AreEqual(0, target.Chart.Series.Count);
            target.Dispose();
        }
Ejemplo n.º 2
0
        public void LineChartControlSeriesTest2()
        {
            LineChartControl target = new LineChartControl();

            target.Series = null;
            target.Dispose();
        }
Ejemplo n.º 3
0
        public void LineChartControlSeriesTest1()
        {
            LineChartControl target = new LineChartControl();
            ObservableCollection <ChartSeries> coll = new ObservableCollection <ChartSeries>();

            target.Series = coll;
            target.Dispose();
        }
Ejemplo n.º 4
0
        public void LineChartControlBindingTest3()
        {
            LineChartControl target = new LineChartControl();
            ObservableCollection <ChartSeries> coll = new ObservableCollection <ChartSeries>();

            target.Series = coll;
            for (int i = 0; i < 100; i++)
            {
                coll.Add(new ChartSeries(i.ToString()));
            }
            Assert.AreEqual(100, target.Chart.Series.Count);
            coll.Clear();
            Assert.AreEqual(0, target.Chart.Series.Count);
            target.Dispose();
        }
Ejemplo n.º 5
0
        public void LineChartControlBindingTest2()
        {
            LineChartControl target = new LineChartControl();
            ObservableCollection <ChartSeries> coll = new ObservableCollection <ChartSeries>();

            target.Series = coll;
            coll.Add(new ChartSeries("Gran Canaria"));
            coll.Add(new ChartSeries("Tenerife"));
            coll.Add(new ChartSeries("Lanzarote"));
            coll.RemoveAt(1);
            Assert.AreEqual(2, target.Chart.Series.Count);
            Assert.IsNotNull(target.Chart.Series["Gran Canaria"]);
            Assert.IsNotNull(target.Chart.Series["Lanzarote"]);
            target.Dispose();
        }
Ejemplo n.º 6
0
        public void LineChartControlSeriesTest4()
        {
            LineChartControl target = new LineChartControl();
            ObservableCollection <ChartSeries> coll = new ObservableCollection <ChartSeries>();
            ChartSeries cs = new ChartSeries("La Palma");

            coll.Add(cs);
            cs.AddPoint(0.644, 2);
            cs.AddPoint(2, 4);
            cs.AddPoint(5, 10);
            cs.AddPoint(20, 42);
            target.Series = coll;
            Assert.AreEqual(4, target.Chart.Series["La Palma"].Points.Count);
            Assert.AreEqual(0.644, target.Chart.Series["La Palma"].Points[0].XValue);
            Assert.AreEqual(42, target.Chart.Series["La Palma"].Points[3].YValues[0]);
            target.Dispose();
        }
Ejemplo n.º 7
0
        public void LineChartControlBindingTest7()
        {
            LineChartControl target = new LineChartControl();
            ObservableCollection <ChartSeries> coll = new ObservableCollection <ChartSeries>();

            target.Series = coll;
            ChartSeries cs = new ChartSeries("Benidorm");

            coll.Add(cs);
            for (int i = 0; i < 100; i++)
            {
                cs.AddPoint(i, i * 2);
            }
            Assert.AreEqual(100, target.Chart.Series["Benidorm"].Points.Count);
            cs.Points.Clear();
            Assert.AreEqual(0, target.Chart.Series["Benidorm"].Points.Count);
            target.Dispose();
        }
Ejemplo n.º 8
0
        public void LineChartControlBindingTest5()
        {
            LineChartControl target = new LineChartControl();
            ObservableCollection <ChartSeries> coll = new ObservableCollection <ChartSeries>();

            target.Series = coll;
            coll.Add(new ChartSeries("Gran Canaria"));
            coll.Add(new ChartSeries("Lanzarote"));
            coll.Add(new ChartSeries("Tenerife"));
            coll[1].AddPoint(5, 8);
            Assert.AreEqual(1, target.Chart.Series["Lanzarote"].Points.Count);
            coll[1].AddPoint(14, 19);
            Assert.AreEqual(2, target.Chart.Series["Lanzarote"].Points.Count);
            Assert.AreEqual(0, target.Chart.Series["Gran Canaria"].Points.Count);
            Assert.AreEqual(0, target.Chart.Series["Tenerife"].Points.Count);
            Assert.AreEqual(5, target.Chart.Series["Lanzarote"].Points[0].XValue);
            Assert.AreEqual(8, target.Chart.Series["Lanzarote"].Points[0].YValues[0]);
            target.Dispose();
        }
Ejemplo n.º 9
0
        public void LineChartControlSeriesTest5()
        {
            LineChartControl target = new LineChartControl();
            ObservableCollection <ChartSeries> coll = new ObservableCollection <ChartSeries>();
            ChartSeries cs = new ChartSeries("La Palma");

            cs.AddPoint(555, 888);
            coll.Add(cs);
            cs = new ChartSeries("Lanzarote");
            cs.AddPoint(18, 4);
            cs.AddPoint(19, 3);
            coll.Add(cs);
            target.Series = coll;
            Assert.AreEqual(1, target.Chart.Series["La Palma"].Points.Count);
            Assert.AreEqual(2, target.Chart.Series["Lanzarote"].Points.Count);
            Assert.AreEqual(555, target.Chart.Series["La Palma"].Points[0].XValue);
            Assert.AreEqual(18, target.Chart.Series["Lanzarote"].Points[0].XValue);
            target.Dispose();
        }
Ejemplo n.º 10
0
 public void BuildChart()
 {
     LineChartControl.BuildChart();
     GaugeControl.BuildChart();
 }