Index: Core/Components/src/Core.Components.Charting/Data/ChartData.cs =================================================================== diff -u -rc349a104ffe6e2b39878cd0169cace7eea4fddb6 -r2d704a409d762d8fb54d2f8be285246861019ea0 --- Core/Components/src/Core.Components.Charting/Data/ChartData.cs (.../ChartData.cs) (revision c349a104ffe6e2b39878cd0169cace7eea4fddb6) +++ Core/Components/src/Core.Components.Charting/Data/ChartData.cs (.../ChartData.cs) (revision 2d704a409d762d8fb54d2f8be285246861019ea0) @@ -70,6 +70,6 @@ /// /// Gets a value indicating whether the has data. /// - public virtual bool HasData { get; } + public abstract bool HasData { get; } } } \ No newline at end of file Index: Core/Components/src/Core.Components.OxyPlot.Forms/ChartControl.cs =================================================================== diff -u -r987d0f2e6c88cd466426fe7d3db4753ac88088f4 -r2d704a409d762d8fb54d2f8be285246861019ea0 --- Core/Components/src/Core.Components.OxyPlot.Forms/ChartControl.cs (.../ChartControl.cs) (revision 987d0f2e6c88cd466426fe7d3db4753ac88088f4) +++ Core/Components/src/Core.Components.OxyPlot.Forms/ChartControl.cs (.../ChartControl.cs) (revision 2d704a409d762d8fb54d2f8be285246861019ea0) @@ -166,12 +166,12 @@ } /// - /// Defines the area taken up by the visible map-data based on the provided map-data. + /// Defines the area taken up by the visible chart data based on the provided chart data. /// /// The data to determine the visible extent for. /// The area definition. /// Thrown when is - /// not part of the drawn map features. + /// not part of the drawn chart data. private Extent CreateEnvelopeForAllVisibleLayers(ChartData chartData) { var collection = chartData as ChartDataCollection; @@ -209,18 +209,18 @@ } /// - /// Defines the area taken up by the visible map-data based on the provided map-data. + /// Defines the area taken up by the visible chart data based on the provided chart data. /// - /// The data to determine the visible extent for. + /// The data to determine the visible extent for. /// The area definition. - /// Thrown when or - /// any of its children is not part of the drawn map features. - private Extent CreateEnvelopeForAllVisibleLayers(ChartDataCollection chartData) + /// Thrown when or + /// any of its children is not part of the drawn chart data. + private Extent CreateEnvelopeForAllVisibleLayers(ChartDataCollection chartDataCollection) { var envelope = new Extent(); - foreach (ChartData childMapData in chartData.Collection) + foreach (ChartData childChartData in chartDataCollection.Collection) { - envelope.ExpandToInclude(CreateEnvelopeForAllVisibleLayers(childMapData)); + envelope.ExpandToInclude(CreateEnvelopeForAllVisibleLayers(childChartData)); } return envelope; } @@ -346,7 +346,7 @@ private class DrawnChartData { /// - /// The item based chart data which the drawn is based upon. + /// The chart data which the drawn is based upon. /// public ChartData ChartData { get; set; } Index: Core/Components/src/Core.Components.OxyPlot.Forms/Extent.cs =================================================================== diff -u -rc349a104ffe6e2b39878cd0169cace7eea4fddb6 -r2d704a409d762d8fb54d2f8be285246861019ea0 --- Core/Components/src/Core.Components.OxyPlot.Forms/Extent.cs (.../Extent.cs) (revision c349a104ffe6e2b39878cd0169cace7eea4fddb6) +++ Core/Components/src/Core.Components.OxyPlot.Forms/Extent.cs (.../Extent.cs) (revision 2d704a409d762d8fb54d2f8be285246861019ea0) @@ -1,3 +1,24 @@ +// Copyright (C) Stichting Deltares 2017. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + using System; namespace Core.Components.OxyPlot.Forms Index: Core/Components/src/Core.Components.OxyPlot/Converter/ChartAreaDataConverter.cs =================================================================== diff -u -r271bd5ffd4d61da4324eb50957f062b14c4c6958 -r2d704a409d762d8fb54d2f8be285246861019ea0 --- Core/Components/src/Core.Components.OxyPlot/Converter/ChartAreaDataConverter.cs (.../ChartAreaDataConverter.cs) (revision 271bd5ffd4d61da4324eb50957f062b14c4c6958) +++ Core/Components/src/Core.Components.OxyPlot/Converter/ChartAreaDataConverter.cs (.../ChartAreaDataConverter.cs) (revision 2d704a409d762d8fb54d2f8be285246861019ea0) @@ -31,7 +31,7 @@ /// public class ChartAreaDataConverter : ChartDataConverter { - protected override void SetSeriesItems(ChartAreaData data, AreaSeries series) + protected override void SetSeriesData(ChartAreaData data, AreaSeries series) { series.Points.Clear(); series.Points2.Clear(); Index: Core/Components/src/Core.Components.OxyPlot/Converter/ChartDataConverter.cs =================================================================== diff -u -r271bd5ffd4d61da4324eb50957f062b14c4c6958 -r2d704a409d762d8fb54d2f8be285246861019ea0 --- Core/Components/src/Core.Components.OxyPlot/Converter/ChartDataConverter.cs (.../ChartDataConverter.cs) (revision 271bd5ffd4d61da4324eb50957f062b14c4c6958) +++ Core/Components/src/Core.Components.OxyPlot/Converter/ChartDataConverter.cs (.../ChartDataConverter.cs) (revision 2d704a409d762d8fb54d2f8be285246861019ea0) @@ -28,30 +28,30 @@ /// /// Abstract base class for transforming data into data. /// - /// The type of item based chart data to convert. + /// The type of chart data to convert. /// The type of series to set the converted data to. public abstract class ChartDataConverter where TChartData : ChartData where TSeries : Series { /// - /// Converts all item related data from to . + /// Converts all chart data from to . /// - /// The data to convert the item related data from. - /// The series to convert the item related data to. + /// The chart data to create the series from. + /// The series to set the converted data to. /// Thrown when or is null. - public void ConvertSeriesItems(TChartData data, TSeries series) + public void ConvertSeriesData(TChartData data, TSeries series) { ValidateParameters(data, series); - SetSeriesItems(data, series); + SetSeriesData(data, series); } /// /// Converts all general properties (like and ) /// from to . /// - /// The data to convert the general properties from. + /// The chart data to convert the general properties from. /// The series to convert the general properties to. /// Thrown when or is null. public void ConvertSeriesProperties(TChartData data, TSeries series) @@ -65,16 +65,16 @@ } /// - /// Sets items to based on . + /// Sets data to based on . /// - /// The data to create the items from. - /// The series to set the items to. - protected abstract void SetSeriesItems(TChartData data, TSeries series); + /// The chart data to create the series from. + /// The series to set the converted data to. + protected abstract void SetSeriesData(TChartData data, TSeries series); /// /// Set a style to based on . /// - /// The data to create the style from. + /// The chart data to create the style from. /// The series to set the style to. protected abstract void SetSeriesStyle(TChartData data, TSeries series); Index: Core/Components/src/Core.Components.OxyPlot/Converter/ChartLineDataConverter.cs =================================================================== diff -u -r271bd5ffd4d61da4324eb50957f062b14c4c6958 -r2d704a409d762d8fb54d2f8be285246861019ea0 --- Core/Components/src/Core.Components.OxyPlot/Converter/ChartLineDataConverter.cs (.../ChartLineDataConverter.cs) (revision 271bd5ffd4d61da4324eb50957f062b14c4c6958) +++ Core/Components/src/Core.Components.OxyPlot/Converter/ChartLineDataConverter.cs (.../ChartLineDataConverter.cs) (revision 2d704a409d762d8fb54d2f8be285246861019ea0) @@ -31,7 +31,7 @@ /// public class ChartLineDataConverter : ChartDataConverter { - protected override void SetSeriesItems(ChartLineData data, LineSeries series) + protected override void SetSeriesData(ChartLineData data, LineSeries series) { series.ItemsSource = data.Points.Select(p => new DataPoint(p.X, p.Y)); } Index: Core/Components/src/Core.Components.OxyPlot/Converter/ChartMultipleAreaDataConverter.cs =================================================================== diff -u -r271bd5ffd4d61da4324eb50957f062b14c4c6958 -r2d704a409d762d8fb54d2f8be285246861019ea0 --- Core/Components/src/Core.Components.OxyPlot/Converter/ChartMultipleAreaDataConverter.cs (.../ChartMultipleAreaDataConverter.cs) (revision 271bd5ffd4d61da4324eb50957f062b14c4c6958) +++ Core/Components/src/Core.Components.OxyPlot/Converter/ChartMultipleAreaDataConverter.cs (.../ChartMultipleAreaDataConverter.cs) (revision 2d704a409d762d8fb54d2f8be285246861019ea0) @@ -32,7 +32,7 @@ /// public class ChartMultipleAreaDataConverter : ChartDataConverter { - protected override void SetSeriesItems(ChartMultipleAreaData data, MultipleAreaSeries series) + protected override void SetSeriesData(ChartMultipleAreaData data, MultipleAreaSeries series) { series.Areas.Clear(); Index: Core/Components/src/Core.Components.OxyPlot/Converter/ChartMultipleLineDataConverter.cs =================================================================== diff -u -r271bd5ffd4d61da4324eb50957f062b14c4c6958 -r2d704a409d762d8fb54d2f8be285246861019ea0 --- Core/Components/src/Core.Components.OxyPlot/Converter/ChartMultipleLineDataConverter.cs (.../ChartMultipleLineDataConverter.cs) (revision 271bd5ffd4d61da4324eb50957f062b14c4c6958) +++ Core/Components/src/Core.Components.OxyPlot/Converter/ChartMultipleLineDataConverter.cs (.../ChartMultipleLineDataConverter.cs) (revision 2d704a409d762d8fb54d2f8be285246861019ea0) @@ -33,7 +33,7 @@ /// public class ChartMultipleLineDataConverter : ChartDataConverter { - protected override void SetSeriesItems(ChartMultipleLineData data, MultipleLineSeries series) + protected override void SetSeriesData(ChartMultipleLineData data, MultipleLineSeries series) { series.Lines.Clear(); Index: Core/Components/src/Core.Components.OxyPlot/Converter/ChartPointDataConverter.cs =================================================================== diff -u -r271bd5ffd4d61da4324eb50957f062b14c4c6958 -r2d704a409d762d8fb54d2f8be285246861019ea0 --- Core/Components/src/Core.Components.OxyPlot/Converter/ChartPointDataConverter.cs (.../ChartPointDataConverter.cs) (revision 271bd5ffd4d61da4324eb50957f062b14c4c6958) +++ Core/Components/src/Core.Components.OxyPlot/Converter/ChartPointDataConverter.cs (.../ChartPointDataConverter.cs) (revision 2d704a409d762d8fb54d2f8be285246861019ea0) @@ -31,7 +31,7 @@ /// public class ChartPointDataConverter : ChartDataConverter { - protected override void SetSeriesItems(ChartPointData data, LineSeries series) + protected override void SetSeriesData(ChartPointData data, LineSeries series) { series.ItemsSource = data.Points.Select(p => new DataPoint(p.X, p.Y)); } Index: Core/Components/src/Core.Components.OxyPlot/DataSeries/ChartAreaDataSeries.cs =================================================================== diff -u -r271bd5ffd4d61da4324eb50957f062b14c4c6958 -r2d704a409d762d8fb54d2f8be285246861019ea0 --- Core/Components/src/Core.Components.OxyPlot/DataSeries/ChartAreaDataSeries.cs (.../ChartAreaDataSeries.cs) (revision 271bd5ffd4d61da4324eb50957f062b14c4c6958) +++ Core/Components/src/Core.Components.OxyPlot/DataSeries/ChartAreaDataSeries.cs (.../ChartAreaDataSeries.cs) (revision 2d704a409d762d8fb54d2f8be285246861019ea0) @@ -58,7 +58,7 @@ { if (!ReferenceEquals(chartAreaData.Points, drawnPoints)) { - converter.ConvertSeriesItems(chartAreaData, this); + converter.ConvertSeriesData(chartAreaData, this); drawnPoints = chartAreaData.Points; } Index: Core/Components/src/Core.Components.OxyPlot/DataSeries/ChartLineDataSeries.cs =================================================================== diff -u -r271bd5ffd4d61da4324eb50957f062b14c4c6958 -r2d704a409d762d8fb54d2f8be285246861019ea0 --- Core/Components/src/Core.Components.OxyPlot/DataSeries/ChartLineDataSeries.cs (.../ChartLineDataSeries.cs) (revision 271bd5ffd4d61da4324eb50957f062b14c4c6958) +++ Core/Components/src/Core.Components.OxyPlot/DataSeries/ChartLineDataSeries.cs (.../ChartLineDataSeries.cs) (revision 2d704a409d762d8fb54d2f8be285246861019ea0) @@ -58,7 +58,7 @@ { if (!ReferenceEquals(chartLineData.Points, drawnPoints)) { - converter.ConvertSeriesItems(chartLineData, this); + converter.ConvertSeriesData(chartLineData, this); drawnPoints = chartLineData.Points; } Index: Core/Components/src/Core.Components.OxyPlot/DataSeries/ChartMultipleAreaDataSeries.cs =================================================================== diff -u -r271bd5ffd4d61da4324eb50957f062b14c4c6958 -r2d704a409d762d8fb54d2f8be285246861019ea0 --- Core/Components/src/Core.Components.OxyPlot/DataSeries/ChartMultipleAreaDataSeries.cs (.../ChartMultipleAreaDataSeries.cs) (revision 271bd5ffd4d61da4324eb50957f062b14c4c6958) +++ Core/Components/src/Core.Components.OxyPlot/DataSeries/ChartMultipleAreaDataSeries.cs (.../ChartMultipleAreaDataSeries.cs) (revision 2d704a409d762d8fb54d2f8be285246861019ea0) @@ -59,7 +59,7 @@ { if (!ReferenceEquals(chartMultipleAreaData.Areas, drawnAreas)) { - converter.ConvertSeriesItems(chartMultipleAreaData, this); + converter.ConvertSeriesData(chartMultipleAreaData, this); drawnAreas = chartMultipleAreaData.Areas; } Index: Core/Components/src/Core.Components.OxyPlot/DataSeries/ChartMultipleLineDataSeries.cs =================================================================== diff -u -r271bd5ffd4d61da4324eb50957f062b14c4c6958 -r2d704a409d762d8fb54d2f8be285246861019ea0 --- Core/Components/src/Core.Components.OxyPlot/DataSeries/ChartMultipleLineDataSeries.cs (.../ChartMultipleLineDataSeries.cs) (revision 271bd5ffd4d61da4324eb50957f062b14c4c6958) +++ Core/Components/src/Core.Components.OxyPlot/DataSeries/ChartMultipleLineDataSeries.cs (.../ChartMultipleLineDataSeries.cs) (revision 2d704a409d762d8fb54d2f8be285246861019ea0) @@ -61,7 +61,7 @@ { if (!ReferenceEquals(chartMultipleLineData.Lines, drawnLines)) { - converter.ConvertSeriesItems(chartMultipleLineData, this); + converter.ConvertSeriesData(chartMultipleLineData, this); drawnLines = chartMultipleLineData.Lines; } Index: Core/Components/src/Core.Components.OxyPlot/DataSeries/ChartPointDataSeries.cs =================================================================== diff -u -r271bd5ffd4d61da4324eb50957f062b14c4c6958 -r2d704a409d762d8fb54d2f8be285246861019ea0 --- Core/Components/src/Core.Components.OxyPlot/DataSeries/ChartPointDataSeries.cs (.../ChartPointDataSeries.cs) (revision 271bd5ffd4d61da4324eb50957f062b14c4c6958) +++ Core/Components/src/Core.Components.OxyPlot/DataSeries/ChartPointDataSeries.cs (.../ChartPointDataSeries.cs) (revision 2d704a409d762d8fb54d2f8be285246861019ea0) @@ -58,7 +58,7 @@ { if (!ReferenceEquals(chartPointData.Points, drawnPoints)) { - converter.ConvertSeriesItems(chartPointData, this); + converter.ConvertSeriesData(chartPointData, this); drawnPoints = chartPointData.Points; } Index: Core/Components/src/Core.Components.OxyPlot/DataSeries/IChartDataSeries.cs =================================================================== diff -u -r271bd5ffd4d61da4324eb50957f062b14c4c6958 -r2d704a409d762d8fb54d2f8be285246861019ea0 --- Core/Components/src/Core.Components.OxyPlot/DataSeries/IChartDataSeries.cs (.../IChartDataSeries.cs) (revision 271bd5ffd4d61da4324eb50957f062b14c4c6958) +++ Core/Components/src/Core.Components.OxyPlot/DataSeries/IChartDataSeries.cs (.../IChartDataSeries.cs) (revision 2d704a409d762d8fb54d2f8be285246861019ea0) @@ -22,7 +22,7 @@ namespace Core.Components.OxyPlot.DataSeries { /// - /// Interface for item based chart data series. + /// Interface for chart data series. /// public interface IChartDataSeries { Index: Core/Components/test/Core.Components.Charting.Test/Core.Components.Charting.Test.csproj =================================================================== diff -u -r344646a09ee37435dd7b82f80e69f62c0f1bd128 -r2d704a409d762d8fb54d2f8be285246861019ea0 --- Core/Components/test/Core.Components.Charting.Test/Core.Components.Charting.Test.csproj (.../Core.Components.Charting.Test.csproj) (revision 344646a09ee37435dd7b82f80e69f62c0f1bd128) +++ Core/Components/test/Core.Components.Charting.Test/Core.Components.Charting.Test.csproj (.../Core.Components.Charting.Test.csproj) (revision 2d704a409d762d8fb54d2f8be285246861019ea0) @@ -85,6 +85,10 @@ {516EBC95-B8F2-428C-B7F6-733F01BF8FDD} Core.Components.Charting + + {E900A014-CA87-4374-87F0-813D653A9698} + Core.Components.Charting.TestUtil + + \ No newline at end of file Index: Core/Components/test/Core.Components.Charting.TestUtil.Test/Properties/AssemblyInfo.cs =================================================================== diff -u --- Core/Components/test/Core.Components.Charting.TestUtil.Test/Properties/AssemblyInfo.cs (revision 0) +++ Core/Components/test/Core.Components.Charting.TestUtil.Test/Properties/AssemblyInfo.cs (revision 2d704a409d762d8fb54d2f8be285246861019ea0) @@ -0,0 +1,57 @@ +// Copyright (C) Stichting Deltares 2017. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Core.Components.Charting.TestUtil.Test")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("Core.Components.Charting.TestUtil.Test")] +[assembly: AssemblyCopyright("Copyright © Microsoft 2017")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("1fd22bc2-b3d5-49d5-9e9b-694be547db6d")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] Index: Core/Components/test/Core.Components.Charting.TestUtil.Test/TestChartDataTest.cs =================================================================== diff -u --- Core/Components/test/Core.Components.Charting.TestUtil.Test/TestChartDataTest.cs (revision 0) +++ Core/Components/test/Core.Components.Charting.TestUtil.Test/TestChartDataTest.cs (revision 2d704a409d762d8fb54d2f8be285246861019ea0) @@ -0,0 +1,71 @@ +// Copyright (C) Stichting Deltares 2017. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using System; +using Core.Components.Charting.Data; +using NUnit.Framework; + +namespace Core.Components.Charting.TestUtil.Test +{ + [TestFixture] + public class TestChartDataTest + { + [Test] + public void DefaultConstructor_InstanceWithExpectedProperties() + { + // Call + var chartData = new TestChartData(); + + // Assert + Assert.IsInstanceOf(chartData); + Assert.AreEqual("test data", chartData.Name); + Assert.IsFalse(chartData.HasData); + } + + [Test] + public void Constructor_WithName_InstanceWithExpectedProperties() + { + // Setup + const string name = "some name"; + + // Call + var chartData = new TestChartData(name); + + // Assert + Assert.IsInstanceOf(chartData); + Assert.AreEqual(name, chartData.Name); + Assert.IsFalse(chartData.HasData); + } + + [Test] + [TestCase(null)] + [TestCase("")] + [TestCase(" ")] + public void Constructor_WithoutName_InstanceWithExpectedProperties(string name) + { + // Call + TestDelegate test = () => new TestChartData(name); + + // Assert + Assert.Throws(test); + } + } +} \ No newline at end of file Index: Core/Components/test/Core.Components.Charting.TestUtil.Test/packages.config =================================================================== diff -u --- Core/Components/test/Core.Components.Charting.TestUtil.Test/packages.config (revision 0) +++ Core/Components/test/Core.Components.Charting.TestUtil.Test/packages.config (revision 2d704a409d762d8fb54d2f8be285246861019ea0) @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file Index: Core/Components/test/Core.Components.Charting.TestUtil/TestChartData.cs =================================================================== diff -u -r67284323e2785c651633d9c52049ba12a9c70e6a -r2d704a409d762d8fb54d2f8be285246861019ea0 --- Core/Components/test/Core.Components.Charting.TestUtil/TestChartData.cs (.../TestChartData.cs) (revision 67284323e2785c651633d9c52049ba12a9c70e6a) +++ Core/Components/test/Core.Components.Charting.TestUtil/TestChartData.cs (.../TestChartData.cs) (revision 2d704a409d762d8fb54d2f8be285246861019ea0) @@ -28,6 +28,17 @@ /// public class TestChartData : ChartData { + /// + /// Creates a new instance of . + /// + /// The name for the . + public TestChartData(string name) : base(name) {} + + /// + /// Creates a new instance of . + /// public TestChartData() : base("test data") {} + + public override bool HasData { get; } } } \ No newline at end of file Index: Core/Components/test/Core.Components.OxyPlot.Forms.Test/ChartControlTest.cs =================================================================== diff -u -r364dfcde1c00a33c19ab33f47373d862dae87067 -r2d704a409d762d8fb54d2f8be285246861019ea0 --- Core/Components/test/Core.Components.OxyPlot.Forms.Test/ChartControlTest.cs (.../ChartControlTest.cs) (revision 364dfcde1c00a33c19ab33f47373d862dae87067) +++ Core/Components/test/Core.Components.OxyPlot.Forms.Test/ChartControlTest.cs (.../ChartControlTest.cs) (revision 2d704a409d762d8fb54d2f8be285246861019ea0) @@ -538,15 +538,6 @@ } } - private void AssertExpectedExtent(ElementCollection modelAxes, Extent expectedExtent) - { - const double accuracy = 1e-8; - Assert.AreEqual(expectedExtent.XMin, modelAxes[0].ActualMinimum, Math.Abs(expectedExtent.XMin * accuracy)); - Assert.AreEqual(expectedExtent.XMax, modelAxes[0].ActualMaximum, Math.Abs(expectedExtent.XMax * accuracy)); - Assert.AreEqual(expectedExtent.YMin, modelAxes[1].ActualMinimum, Math.Abs(expectedExtent.YMin * accuracy)); - Assert.AreEqual(expectedExtent.YMax, modelAxes[1].ActualMaximum, Math.Abs(expectedExtent.YMax * accuracy)); - } - [Test] [TestCase(5.0, 5.0)] [TestCase(45.3, 1.0)] @@ -694,7 +685,7 @@ AssertExpectedExtent(view.Model.Axes, expectedExtent); } } - + [Test] public void ZoomToAllVisibleLayers_ForInvisibleChildChartData_DoNotChangeViewExtentsOfChartView() { @@ -736,5 +727,14 @@ } #endregion + + private void AssertExpectedExtent(ElementCollection modelAxes, Extent expectedExtent) + { + const double accuracy = 1e-8; + Assert.AreEqual(expectedExtent.XMin, modelAxes[0].ActualMinimum, Math.Abs(expectedExtent.XMin * accuracy)); + Assert.AreEqual(expectedExtent.XMax, modelAxes[0].ActualMaximum, Math.Abs(expectedExtent.XMax * accuracy)); + Assert.AreEqual(expectedExtent.YMin, modelAxes[1].ActualMinimum, Math.Abs(expectedExtent.YMin * accuracy)); + Assert.AreEqual(expectedExtent.YMax, modelAxes[1].ActualMaximum, Math.Abs(expectedExtent.YMax * accuracy)); + } } } \ No newline at end of file Index: Core/Components/test/Core.Components.OxyPlot.Test/Converter/ChartAreaDataConverterTest.cs =================================================================== diff -u -r271bd5ffd4d61da4324eb50957f062b14c4c6958 -r2d704a409d762d8fb54d2f8be285246861019ea0 --- Core/Components/test/Core.Components.OxyPlot.Test/Converter/ChartAreaDataConverterTest.cs (.../ChartAreaDataConverterTest.cs) (revision 271bd5ffd4d61da4324eb50957f062b14c4c6958) +++ Core/Components/test/Core.Components.OxyPlot.Test/Converter/ChartAreaDataConverterTest.cs (.../ChartAreaDataConverterTest.cs) (revision 2d704a409d762d8fb54d2f8be285246861019ea0) @@ -66,7 +66,7 @@ }; // Call - converter.ConvertSeriesItems(areaData, areaSeries); + converter.ConvertSeriesData(areaData, areaSeries); // Assert DataPoint[] expectedPoints = points.Select(t => new DataPoint(t.X, t.Y)).ToArray(); Index: Core/Components/test/Core.Components.OxyPlot.Test/Converter/ChartDataConverterTest.cs =================================================================== diff -u -r271bd5ffd4d61da4324eb50957f062b14c4c6958 -r2d704a409d762d8fb54d2f8be285246861019ea0 --- Core/Components/test/Core.Components.OxyPlot.Test/Converter/ChartDataConverterTest.cs (.../ChartDataConverterTest.cs) (revision 271bd5ffd4d61da4324eb50957f062b14c4c6958) +++ Core/Components/test/Core.Components.OxyPlot.Test/Converter/ChartDataConverterTest.cs (.../ChartDataConverterTest.cs) (revision 2d704a409d762d8fb54d2f8be285246861019ea0) @@ -22,6 +22,7 @@ using System; using Core.Common.TestUtil; using Core.Components.Charting.Data; +using Core.Components.Charting.TestUtil; using Core.Components.OxyPlot.Converter; using NUnit.Framework; using OxyPlot.Series; @@ -39,7 +40,7 @@ var series = new TestSeries(); // Call - TestDelegate test = () => testConverter.ConvertSeriesItems(null, series); + TestDelegate test = () => testConverter.ConvertSeriesData(null, series); // Assert const string expectedMessage = "Null data cannot be converted into series data."; @@ -54,7 +55,7 @@ var chartData = new TestChartData("test data"); // Call - TestDelegate test = () => testConverter.ConvertSeriesItems(chartData, null); + TestDelegate test = () => testConverter.ConvertSeriesData(chartData, null); // Assert const string expectedMessage = "Null data cannot be used as conversion target."; @@ -128,14 +129,9 @@ private class TestSeries : LineSeries {} - private class TestChartData : ChartData - { - public TestChartData(string name) : base(name) {} - } - private class TestChartDataConverter : ChartDataConverter { - protected override void SetSeriesItems(TestChartData data, TestSeries series) {} + protected override void SetSeriesData(TestChartData data, TestSeries series) {} protected override void SetSeriesStyle(TestChartData data, TestSeries series) {} } Index: Core/Components/test/Core.Components.OxyPlot.Test/Converter/ChartLineDataConverterTest.cs =================================================================== diff -u -r271bd5ffd4d61da4324eb50957f062b14c4c6958 -r2d704a409d762d8fb54d2f8be285246861019ea0 --- Core/Components/test/Core.Components.OxyPlot.Test/Converter/ChartLineDataConverterTest.cs (.../ChartLineDataConverterTest.cs) (revision 271bd5ffd4d61da4324eb50957f062b14c4c6958) +++ Core/Components/test/Core.Components.OxyPlot.Test/Converter/ChartLineDataConverterTest.cs (.../ChartLineDataConverterTest.cs) (revision 2d704a409d762d8fb54d2f8be285246861019ea0) @@ -68,7 +68,7 @@ }; // Call - converter.ConvertSeriesItems(lineData, lineSeries); + converter.ConvertSeriesData(lineData, lineSeries); // Assert CollectionAssert.AreEqual(points.Select(p => new DataPoint(p.X, p.Y)), lineSeries.ItemsSource); Index: Core/Components/test/Core.Components.OxyPlot.Test/Converter/ChartMultipleAreaDataConverterTest.cs =================================================================== diff -u -r271bd5ffd4d61da4324eb50957f062b14c4c6958 -r2d704a409d762d8fb54d2f8be285246861019ea0 --- Core/Components/test/Core.Components.OxyPlot.Test/Converter/ChartMultipleAreaDataConverterTest.cs (.../ChartMultipleAreaDataConverterTest.cs) (revision 271bd5ffd4d61da4324eb50957f062b14c4c6958) +++ Core/Components/test/Core.Components.OxyPlot.Test/Converter/ChartMultipleAreaDataConverterTest.cs (.../ChartMultipleAreaDataConverterTest.cs) (revision 2d704a409d762d8fb54d2f8be285246861019ea0) @@ -77,7 +77,7 @@ }; // Call - converter.ConvertSeriesItems(areaData, multipleAreaSeries); + converter.ConvertSeriesData(areaData, multipleAreaSeries); // Assert Assert.AreEqual(2, multipleAreaSeries.Areas.Count); Index: Core/Components/test/Core.Components.OxyPlot.Test/Converter/ChartMultipleLineDataConverterTest.cs =================================================================== diff -u -r271bd5ffd4d61da4324eb50957f062b14c4c6958 -r2d704a409d762d8fb54d2f8be285246861019ea0 --- Core/Components/test/Core.Components.OxyPlot.Test/Converter/ChartMultipleLineDataConverterTest.cs (.../ChartMultipleLineDataConverterTest.cs) (revision 271bd5ffd4d61da4324eb50957f062b14c4c6958) +++ Core/Components/test/Core.Components.OxyPlot.Test/Converter/ChartMultipleLineDataConverterTest.cs (.../ChartMultipleLineDataConverterTest.cs) (revision 2d704a409d762d8fb54d2f8be285246861019ea0) @@ -78,7 +78,7 @@ }; // Call - converter.ConvertSeriesItems(lineData, multipleLineSeries); + converter.ConvertSeriesData(lineData, multipleLineSeries); // Assert Assert.AreEqual(2, multipleLineSeries.Lines.Count); Index: Core/Components/test/Core.Components.OxyPlot.Test/Converter/ChartPointDataConverterTest.cs =================================================================== diff -u -r271bd5ffd4d61da4324eb50957f062b14c4c6958 -r2d704a409d762d8fb54d2f8be285246861019ea0 --- Core/Components/test/Core.Components.OxyPlot.Test/Converter/ChartPointDataConverterTest.cs (.../ChartPointDataConverterTest.cs) (revision 271bd5ffd4d61da4324eb50957f062b14c4c6958) +++ Core/Components/test/Core.Components.OxyPlot.Test/Converter/ChartPointDataConverterTest.cs (.../ChartPointDataConverterTest.cs) (revision 2d704a409d762d8fb54d2f8be285246861019ea0) @@ -68,7 +68,7 @@ }; // Call - converter.ConvertSeriesItems(pointData, lineSeries); + converter.ConvertSeriesData(pointData, lineSeries); // Assert CollectionAssert.AreEqual(points.Select(p => new DataPoint(p.X, p.Y)), lineSeries.ItemsSource); Index: Core/Components/test/Core.Components.OxyPlot.Test/Core.Components.OxyPlot.Test.csproj =================================================================== diff -u -r271bd5ffd4d61da4324eb50957f062b14c4c6958 -r2d704a409d762d8fb54d2f8be285246861019ea0 --- Core/Components/test/Core.Components.OxyPlot.Test/Core.Components.OxyPlot.Test.csproj (.../Core.Components.OxyPlot.Test.csproj) (revision 271bd5ffd4d61da4324eb50957f062b14c4c6958) +++ Core/Components/test/Core.Components.OxyPlot.Test/Core.Components.OxyPlot.Test.csproj (.../Core.Components.OxyPlot.Test.csproj) (revision 2d704a409d762d8fb54d2f8be285246861019ea0) @@ -100,6 +100,10 @@ {2344A7BD-7E25-4A1A-982E-6C674AF5167A} Core.Components.OxyPlot + + {E900A014-CA87-4374-87F0-813D653A9698} + Core.Components.Charting.TestUtil +