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();
 }
 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();
 }
 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();
 }
 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();
 }
 public void LineChartControlSeriesTest2()
 {
     LineChartControl target = new LineChartControl();
     target.Series = null;
     target.Dispose();
 }
 public void LineChartControlSeriesTest1()
 {
     LineChartControl target = new LineChartControl();
     ObservableCollection<ChartSeries> coll = new ObservableCollection<ChartSeries>();
     target.Series = coll;
     target.Dispose();
 }
 public void LineChartControlConstructorTest()
 {
     LineChartControl target = new LineChartControl();
     Assert.AreEqual(0, target.Chart.Series.Count);
     target.Dispose();
 }
 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();
 }
 public void LineChartControlBindingTest6()
 {
     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);
     coll[1].AddPoint(14, 19);
     coll[1].AddPoint(25, 37);
     coll[1].Points.RemoveAt(0);
     Assert.AreEqual(2, target.Chart.Series["Lanzarote"].Points.Count);
     coll[1].Points.RemoveAt(0);
     Assert.AreEqual(1, target.Chart.Series["Lanzarote"].Points.Count);
     Assert.AreEqual(25, target.Chart.Series["Lanzarote"].Points[0].XValue);
     Assert.AreEqual(37, target.Chart.Series["Lanzarote"].Points[0].YValues[0]);
     target.Dispose();
 }