diff --git a/tests/LiveChartsCore.UnitTesting/OtherTests/DataProviderTest.cs b/tests/LiveChartsCore.UnitTesting/OtherTests/DataProviderTest.cs index 95b12a3c6..03651e4a2 100644 --- a/tests/LiveChartsCore.UnitTesting/OtherTests/DataProviderTest.cs +++ b/tests/LiveChartsCore.UnitTesting/OtherTests/DataProviderTest.cs @@ -197,45 +197,7 @@ public void FetchCustomType() var sutSeries = new ColumnSeries { Values = new City[] { new(1), new(1), new(1), new(1), new(1) }, - Mapping = (city, point) => - { - point.Coordinate = new(point.Index, city.Population.Value); - } - }; - - var chart = new SKCartesianChart - { - Width = 100, - Height = 100, - Series = new[] { sutSeries } - }; - - _ = chart.GetImage(); - - var datafactory = sutSeries.DataFactory; - var points = datafactory.Fetch(sutSeries, chart.Core).ToArray(); - - for (var i = 0; i < points.Length; i++) - { - var point = points[i]; - var c = point.Coordinate; - Assert.IsTrue(c.SecondaryValue == i && c.PrimaryValue == 1); - } - } - - [TestMethod] - public void FetchCustomTypeObsolete() - { - var sutSeries = new ColumnSeries - { - Values = new City[] { new(1), new(1), new(1), new(1), new(1) }, - Mapping = (city, point) => - { -#pragma warning disable CS0618 // Type or member is obsolete - point.PrimaryValue = city.Population.Value; - point.SecondaryValue = point.Index; -#pragma warning restore CS0618 // Type or member is obsolete - } + Mapping = (city, index) => new(index, city.Population.Value) }; var chart = new SKCartesianChart @@ -265,13 +227,10 @@ public void FetchCoordinateEmpty() var sutSeries = new ColumnSeries { Values = new City[] { new(1), new(null), new(1), new(null), new(1) }, - Mapping = (city, point) => - { - point.Coordinate = - city.Population is null - ? Coordinate.Empty - : new(point.Index, city.Population.Value); - } + Mapping = (city, index) => + city.Population is null + ? Coordinate.Empty + : new(index, city.Population.Value) }; var chart = new SKCartesianChart @@ -313,10 +272,7 @@ public void FetchNull() var sutSeries = new ColumnSeries { Values = new City[] { new(1), null, new(1), null, new(1) }, - Mapping = (city, point) => - { - point.Coordinate = new(point.Index, city.Population.Value); - } + Mapping = (city, index) => new(index, city.Population.Value) }; var chart = new SKCartesianChart