public void ContextMenuStrip_InvisibleChartDataInChartDataCollection_ZoomToAllDisabled()
        {
            // Setup
            var builder = new CustomItemsOnlyContextMenuBuilder();

            contextMenuBuilderProvider.Expect(p => p.Get(null, null)).IgnoreArguments().Return(builder);
            mocks.ReplayAll();

            var pointData = new ChartPointData("test data")
            {
                IsVisible = false
            };
            var chartDataCollection = new ChartDataCollection("test data");

            chartDataCollection.Add(pointData);

            // Call
            using (ContextMenuStrip contextMenu = info.ContextMenuStrip(chartDataCollection, null, null))
            {
                // Assert
                TestHelper.AssertContextMenuStripContainsItem(contextMenu, contextMenuZoomToAllIndex,
                                                              "&Zoom naar alles",
                                                              "Om het zoomniveau aan te passen moet er minstens één gegevensreeks in deze map met gegevensreeksen zichtbaar zijn.",
                                                              Resources.ZoomToAllIcon,
                                                              false);
            }
        }
Пример #2
0
        public void ConvertSeriesItems_ChartPointDataWithRandomPointData_ConvertsAllPointsToPointSeries()
        {
            // Setup
            var converter   = new ChartPointDataConverter();
            var lineSeries  = new LineSeries();
            var random      = new Random(21);
            int randomCount = random.Next(5, 10);

            var points = new Collection <Point2D>();

            for (var i = 0; i < randomCount; i++)
            {
                points.Add(new Point2D(random.NextDouble(), random.NextDouble()));
            }

            var pointData = new ChartPointData("test data")
            {
                Points = points.ToArray()
            };

            // Call
            converter.ConvertSeriesData(pointData, lineSeries);

            // Assert
            CollectionAssert.AreEqual(points.Select(p => new DataPoint(p.X, p.Y)), lineSeries.ItemsSource);
        }
        public void OnDrop_ChartDataMovedToPositionOutsideRange_ThrowsException(int position)
        {
            // Setup
            var observer = mocks.StrictMock <IObserver>();

            mocks.ReplayAll();

            var chartData1          = new ChartLineData("line");
            var chartData2          = new ChartAreaData("area");
            var chartData3          = new ChartPointData("point");
            var chartData4          = new ChartMultipleAreaData("multiple area");
            var chartDataCollection = new ChartDataCollection("test data");

            chartDataCollection.Add(chartData1);
            chartDataCollection.Add(chartData2);
            chartDataCollection.Add(chartData3);
            chartDataCollection.Add(chartData4);

            chartDataCollection.Attach(observer);
            chartLegendView.Data = chartDataCollection;

            ChartDataContext context1 = GetContext(chartData1);

            chartDataCollection.Attach(observer);

            using (var treeViewControl = new TreeViewControl())
            {
                // Call
                void Call() => info.OnDrop(context1, chartDataCollection, chartDataCollection, position, treeViewControl);

                // Assert
                Assert.Throws <ArgumentOutOfRangeException>(Call);
            }
        }
Пример #4
0
        /// <summary>
        /// Creates a new instance of <see cref="PipingInputView"/>.
        /// </summary>
        public PipingInputView()
        {
            InitializeComponent();

            calculationObserver      = new Observer(UpdateChartTitle);
            calculationInputObserver = new Observer(UpdateViewData);

            chartDataCollection            = new ChartDataCollection(RiskeerCommonFormsResources.Calculation_Input);
            soilProfileChartData           = RiskeerChartDataFactory.CreateSoilProfileChartData();
            surfaceLineChartData           = RiskeerChartDataFactory.CreateSurfaceLineChartData();
            ditchPolderSideChartData       = RiskeerChartDataFactory.CreateDitchPolderSideChartData();
            bottomDitchPolderSideChartData = RiskeerChartDataFactory.CreateBottomDitchPolderSideChartData();
            bottomDitchDikeSideChartData   = RiskeerChartDataFactory.CreateBottomDitchDikeSideChartData();
            ditchDikeSideChartData         = RiskeerChartDataFactory.CreateDitchDikeSideChartData();
            dikeToeAtPolderChartData       = RiskeerChartDataFactory.CreateDikeToeAtPolderChartData();
            dikeToeAtRiverChartData        = RiskeerChartDataFactory.CreateDikeToeAtRiverChartData();
            exitPointChartData             = PipingChartDataFactory.CreateExitPointChartData();
            entryPointChartData            = PipingChartDataFactory.CreateEntryPointChartData();

            chartDataCollection.Add(soilProfileChartData);
            chartDataCollection.Add(surfaceLineChartData);
            chartDataCollection.Add(ditchPolderSideChartData);
            chartDataCollection.Add(bottomDitchPolderSideChartData);
            chartDataCollection.Add(bottomDitchDikeSideChartData);
            chartDataCollection.Add(ditchDikeSideChartData);
            chartDataCollection.Add(dikeToeAtPolderChartData);
            chartDataCollection.Add(dikeToeAtRiverChartData);
            chartDataCollection.Add(exitPointChartData);
            chartDataCollection.Add(entryPointChartData);

            soilLayerChartDataLookup = new List <ChartMultipleAreaData>(); // Use lookup because the ordering in the chart data collection might change
        }
        public void Data_SetNewChartPointDataInstance_ReturnCorrectPropertyValues()
        {
            // Setup
            Color     color               = Color.Aqua;
            Color     strokeColor         = Color.Crimson;
            const int size                = 4;
            const int strokeThickness     = 2;
            const ChartPointSymbol symbol = ChartPointSymbol.Circle;

            var chartPointData = new ChartPointData("Test", new ChartPointStyle
            {
                Color           = color,
                StrokeColor     = strokeColor,
                Size            = size,
                StrokeThickness = strokeThickness,
                Symbol          = symbol
            });
            var properties = new ChartPointDataProperties();

            // Call
            properties.Data = chartPointData;

            // Assert
            Assert.AreEqual(color, properties.Color);
            Assert.AreEqual(strokeColor, properties.StrokeColor);
            Assert.AreEqual(strokeThickness, properties.StrokeThickness);
            Assert.AreEqual(size, properties.Size);
            Assert.AreEqual(symbol, properties.Symbol);
        }
Пример #6
0
        public void GivenChartControlWithoutData_WhenDataSetToChartDataCollection_ThenChartControlUpdated()
        {
            // Given
            using (var chartControl = new ChartControl())
            {
                LinearPlotView linearPlotView             = GetLinearPlotView(chartControl);
                var            chartPointData             = new ChartPointData("Points");
                var            chartLineData              = new ChartLineData("Lines");
                var            chartAreaData              = new ChartAreaData("Areas");
                var            chartDataCollection        = new ChartDataCollection("Root collection");
                var            nestedChartDataCollection1 = new ChartDataCollection("Nested collection 1");
                var            nestedChartDataCollection2 = new ChartDataCollection("Nested collection 2");

                chartDataCollection.Add(chartPointData);
                chartDataCollection.Add(nestedChartDataCollection1);
                nestedChartDataCollection1.Add(chartLineData);
                nestedChartDataCollection1.Add(nestedChartDataCollection2);
                nestedChartDataCollection2.Add(chartAreaData);

                // When
                chartControl.Data = chartDataCollection;

                // Then
                ElementCollection <Series> series = linearPlotView.Model.Series;
                Assert.AreEqual(3, series.Count);
                Assert.AreEqual("Points", series[0].Title);
                Assert.AreEqual("Lines", series[1].Title);
                Assert.AreEqual("Areas", series[2].Title);
            }
        }
Пример #7
0
        public void GivenChartControlWithData_WhenDataSetToOtherChartDataCollection_ThenChartControlUpdated()
        {
            // Given
            using (var chartControl = new ChartControl())
            {
                LinearPlotView linearPlotView       = GetLinearPlotView(chartControl);
                var            chartPointData       = new ChartPointData("Points");
                var            chartLineData        = new ChartLineData("Lines");
                var            chartAreaData        = new ChartAreaData("Areas");
                var            chartDataCollection1 = new ChartDataCollection("Collection 1");
                var            chartDataCollection2 = new ChartDataCollection("Collection 2");

                chartDataCollection1.Add(chartPointData);
                chartDataCollection2.Add(chartLineData);
                chartDataCollection2.Add(chartAreaData);

                chartControl.Data = chartDataCollection1;

                // Precondition
                Assert.AreEqual(1, linearPlotView.Model.Series.Count);
                Assert.AreEqual("Points", linearPlotView.Model.Series[0].Title);

                // When
                chartControl.Data = chartDataCollection2;

                // Then
                Assert.AreEqual(2, linearPlotView.Model.Series.Count);
                Assert.AreEqual("Lines", linearPlotView.Model.Series[0].Title);
                Assert.AreEqual("Areas", linearPlotView.Model.Series[1].Title);
            }
        }
Пример #8
0
        public void ZoomToVisibleSeries_ChartInFormWithEmptyDataSetAndZoomChildChartData_ViewNotInvalidated()
        {
            // Setup
            using (var form = new Form())
            {
                var            chartControl   = new ChartControl();
                LinearPlotView linearPlotView = GetLinearPlotView(chartControl);
                form.Controls.Add(chartControl);
                form.Show();

                var chartDataCollection = new ChartDataCollection("Collection");
                var chartData           = new ChartPointData("Test data");
                var invalidated         = 0;

                chartDataCollection.Add(chartData);

                chartControl.Data = chartDataCollection;
                chartControl.Update();

                var expectedExtent = new Extent(
                    linearPlotView.Model.Axes[0].ActualMinimum,
                    linearPlotView.Model.Axes[0].ActualMaximum,
                    linearPlotView.Model.Axes[1].ActualMinimum,
                    linearPlotView.Model.Axes[1].ActualMaximum);

                linearPlotView.Invalidated += (sender, args) => invalidated++;

                // Call
                chartControl.ZoomToVisibleSeries(chartData);

                // Assert
                Assert.AreEqual(0, invalidated);
                AssertExpectedExtent(linearPlotView.Model.Axes, expectedExtent);
            }
        }
Пример #9
0
        public void GivenChartControlWithData_WhenChartDataNotifiesChange_ThenAllSeriesReused()
        {
            // Given
            using (var chartControl = new ChartControl())
            {
                LinearPlotView linearPlotView             = GetLinearPlotView(chartControl);
                var            chartPointData             = new ChartPointData("Points");
                var            chartLineData              = new ChartLineData("Lines");
                var            chartAreaData              = new ChartAreaData("Areas");
                var            chartDataCollection        = new ChartDataCollection("Root collection");
                var            nestedChartDataCollection1 = new ChartDataCollection("Nested collection 1");
                var            nestedChartDataCollection2 = new ChartDataCollection("Nested collection 2");

                chartDataCollection.Add(chartPointData);
                chartDataCollection.Add(nestedChartDataCollection1);
                nestedChartDataCollection1.Add(chartLineData);
                nestedChartDataCollection1.Add(nestedChartDataCollection2);
                nestedChartDataCollection2.Add(chartAreaData);

                chartControl.Data = chartDataCollection;

                List <Series> seriesBeforeUpdate = linearPlotView.Model.Series.ToList();

                // When
                chartLineData.Points = new Point2D[0];
                chartLineData.NotifyObservers();

                // Then
                CollectionAssert.AreEqual(seriesBeforeUpdate, linearPlotView.Model.Series);
            }
        }
Пример #10
0
        public void GetFeatureBasedChartDataRecursively_CollectionWithNestedData_ReturnAllFeatureBasedChartData()
        {
            // Setup
            var line             = new ChartLineData("line");
            var polygon          = new ChartAreaData("polygon");
            var nestedCollection = new ChartDataCollection("nested");

            nestedCollection.Add(line);
            nestedCollection.Add(polygon);

            var collection = new ChartDataCollection("test");
            var point      = new ChartPointData("point");

            collection.Add(point);
            collection.Add(nestedCollection);

            // Call
            ChartData[] featureBasedChartDatas = collection.GetChartDataRecursively().ToArray();

            // Assert
            Assert.AreEqual(3, featureBasedChartDatas.Length);
            Assert.IsInstanceOf <ChartPointData>(featureBasedChartDatas[0]);
            Assert.IsInstanceOf <ChartLineData>(featureBasedChartDatas[1]);
            Assert.IsInstanceOf <ChartAreaData>(featureBasedChartDatas[2]);
        }
        public void ContextMenuStrip_ChartDataCollectionWithVisibleChartData_ZoomToAllEnabled()
        {
            // Setup
            var builder = new CustomItemsOnlyContextMenuBuilder();

            contextMenuBuilderProvider.Expect(p => p.Get(null, null)).IgnoreArguments().Return(builder);
            mocks.ReplayAll();

            var chartPointData = new ChartPointData("test")
            {
                IsVisible = true,
                Points    = new[]
                {
                    new Point2D(0, 1)
                }
            };
            var chartDataCollection = new ChartDataCollection("test data");

            chartDataCollection.Add(chartPointData);

            // Call
            using (ContextMenuStrip contextMenu = info.ContextMenuStrip(chartDataCollection, null, null))
            {
                // Assert
                TestHelper.AssertContextMenuStripContainsItem(contextMenu, contextMenuZoomToAllIndex,
                                                              "&Zoom naar alles",
                                                              "Zet het zoomniveau van de grafiek dusdanig dat alle zichtbare gegevensreeksen in deze map met gegevensreeksen precies in het beeld passen.",
                                                              Resources.ZoomToAllIcon);
            }
        }
Пример #12
0
 private static void SetChartPointDataTestProperties(ChartPointData chartPointData)
 {
     chartPointData.Name      = "Another name";
     chartPointData.IsVisible = false;
     chartPointData.Points    = new[]
     {
         new Point2D(1.1, 2.2)
     };
 }
Пример #13
0
        public void CreateShoulderTopInsideChartData_ReturnsChartPointDataWithExpectedStyling()
        {
            // Call
            ChartPointData data = MacroStabilityInwardsChartDataFactory.CreateShoulderTopInsideChartData();

            // Assert
            Assert.IsFalse(data.HasData);
            Assert.AreEqual("Kruin binnenberm", data.Name);
            AssertEqualStyle(data.Style, Color.DeepSkyBlue, 8, Color.SeaGreen, 1, ChartPointSymbol.Triangle);
        }
Пример #14
0
        public void CreateLeftGridChartData_ReturnsChartPointDataWithExpectedStyling()
        {
            // Call
            ChartPointData data = MacroStabilityInwardsChartDataFactory.CreateLeftGridChartData();

            // Assert
            Assert.IsFalse(data.HasData);
            Assert.AreEqual("Linker grid", data.Name);
            AssertEqualStyle(data.Style, Color.Black, 6, Color.Black, 2, ChartPointSymbol.Plus);
        }
Пример #15
0
        public void CreateSurfaceLevelOutsideChartData_ReturnsChartPointDataWithExpectedStyling()
        {
            // Call
            ChartPointData data = MacroStabilityInwardsChartDataFactory.CreateSurfaceLevelOutsideChartData();

            // Assert
            Assert.IsFalse(data.HasData);
            Assert.AreEqual("Maaiveld buitenwaarts", data.Name);
            AssertEqualStyle(data.Style, Color.LightSeaGreen, 8, Color.Black, 1, ChartPointSymbol.Square);
        }
Пример #16
0
        public void CreateDikeToeAtRiverChartData_ReturnsChartPointDataWithExpectedStyling()
        {
            // Call
            ChartPointData data = RiskeerChartDataFactory.CreateDikeToeAtRiverChartData();

            // Assert
            Assert.IsFalse(data.HasData);
            Assert.AreEqual("Teen dijk buitenwaarts", data.Name);
            AssertEqualStyle(data.Style, Color.DarkGray, 8, Color.Black, 1, ChartPointSymbol.Square);
        }
Пример #17
0
        public void CreateDikeTopAtRiverChartData_ReturnsChartPointDataWithExpectedStyling()
        {
            // Call
            ChartPointData data = MacroStabilityInwardsChartDataFactory.CreateDikeTopAtRiverChartData();

            // Assert
            Assert.IsFalse(data.HasData);
            Assert.AreEqual("Kruin buitentalud", data.Name);
            AssertEqualStyle(data.Style, Color.LightSteelBlue, 8, Color.SeaGreen, 1, ChartPointSymbol.Triangle);
        }
Пример #18
0
        public void CreateDitchPolderSideChartData_ReturnsChartPointDataWithExpectedStyling()
        {
            // Call
            ChartPointData data = RiskeerChartDataFactory.CreateDitchPolderSideChartData();

            // Assert
            Assert.IsFalse(data.HasData);
            Assert.AreEqual("Insteek sloot polderzijde", data.Name);
            AssertEqualStyle(data.Style, Color.IndianRed, 8, Color.Transparent, 0, ChartPointSymbol.Circle);
        }
Пример #19
0
        public void CreateBottomDitchDikeSideChartData_ReturnsChartPointDataWithExpectedStyling()
        {
            // Call
            ChartPointData data = RiskeerChartDataFactory.CreateBottomDitchDikeSideChartData();

            // Assert
            Assert.IsFalse(data.HasData);
            Assert.AreEqual("Slootbodem dijkzijde", data.Name);
            AssertEqualStyle(data.Style, Color.DarkSeaGreen, 8, Color.Transparent, 0, ChartPointSymbol.Circle);
        }
Пример #20
0
        public void CreateExitPointChartData_ReturnsEmptyChartPointDataWithExpectedStyling()
        {
            // Call
            ChartPointData data = PipingChartDataFactory.CreateExitPointChartData();

            // Assert
            CollectionAssert.IsEmpty(data.Points);
            Assert.AreEqual("Uittredepunt", data.Name);
            AssertEqualStyle(data.Style, Color.Tomato, 8, Color.Transparent, 0, ChartPointSymbol.Triangle);
        }
Пример #21
0
        public void Constructor_Always_CreatesNewInstanceOfDefaultStyle()
        {
            // Setup
            var dataA = new ChartPointData("test data");

            // Call
            var dataB = new ChartPointData("test data");

            // Assert
            Assert.AreNotSame(dataA.Style, dataB.Style);
        }
Пример #22
0
        /// <summary>
        /// Creates a new instance of <see cref="ChartPointDataSeries"/>.
        /// </summary>
        /// <param name="chartPointData">The <see cref="ChartPointData"/> which the chart point data series is based upon.</param>
        /// <exception cref="ArgumentNullException">Thrown when <paramref name="chartPointData"/> is <c>null</c>.</exception>
        public ChartPointDataSeries(ChartPointData chartPointData)
        {
            if (chartPointData == null)
            {
                throw new ArgumentNullException(nameof(chartPointData));
            }

            this.chartPointData = chartPointData;

            Update();
        }
        /// <summary>
        /// Asserts whether <paramref name="actual"/> corresponds to <paramref name="original"/>.
        /// </summary>
        /// <param name="original">The original <see cref="MacroStabilityInwardsGrid"/>.</param>
        /// <param name="actual">The actual <see cref="ChartPointData"/>.</param>
        /// <exception cref="AssertionException">Thrown when <paramref name="actual"/>
        /// does not correspond to <paramref name="original"/>.</exception>
        public static void AssertGridChartData(MacroStabilityInwardsGrid original, ChartPointData actual)
        {
            var expectedPoints = new[]
            {
                new Point2D(original.XLeft, original.ZBottom),
                new Point2D(original.XRight, original.ZBottom),
                new Point2D(original.XLeft, original.ZTop),
                new Point2D(original.XRight, original.ZTop)
            };

            CollectionAssert.AreEqual(expectedPoints, actual.Points);
        }
Пример #24
0
        public void Constructor_WithStyle_ExpectedValue()
        {
            // Setup
            var style = new ChartPointStyle();

            // Call
            var data = new ChartPointData("test data", style);

            // Assert
            Assert.AreEqual("test data", data.Name);
            CollectionAssert.IsEmpty(data.Points);
            Assert.IsInstanceOf <PointBasedChartData>(data);
            Assert.AreSame(style, data.Style);
        }
Пример #25
0
        public void Constructor_ValidName_NameAndDefaultValuesSet()
        {
            // Call
            var data = new ChartPointData("test data");

            // Assert
            Assert.AreEqual("test data", data.Name);
            CollectionAssert.IsEmpty(data.Points);
            Assert.IsInstanceOf <PointBasedChartData>(data);
            Assert.AreEqual(Color.Black, data.Style.Color);
            Assert.AreEqual(2, data.Style.Size);
            Assert.AreEqual(ChartPointSymbol.Square, data.Style.Symbol);
            Assert.AreEqual(Color.Black, data.Style.StrokeColor);
            Assert.AreEqual(1, data.Style.StrokeThickness);
            Assert.IsFalse(data.Style.IsEditable);
        }
        public void SetProperties_IndividualProperties_UpdateDataAndNotifyObservers()
        {
            // Setup
            const int numberOfChangedProperties = 5;
            var       mocks    = new MockRepository();
            var       observer = mocks.StrictMock <IObserver>();

            observer.Expect(o => o.UpdateObserver()).Repeat.Times(numberOfChangedProperties);
            mocks.ReplayAll();

            var chartPointData = new ChartPointData("Test", new ChartPointStyle
            {
                Color           = Color.AliceBlue,
                StrokeColor     = Color.Fuchsia,
                Size            = 3,
                StrokeThickness = 1,
                Symbol          = ChartPointSymbol.Circle
            });

            chartPointData.Attach(observer);

            var properties = new ChartPointDataProperties
            {
                Data = chartPointData
            };

            Color     newColor               = Color.Blue;
            Color     newStrokeColor         = Color.Aquamarine;
            const int newSize                = 6;
            const ChartPointSymbol newSymbol = ChartPointSymbol.Diamond;
            const int newStrokeThickness     = 4;

            // Call
            properties.Color           = newColor;
            properties.Size            = newSize;
            properties.Symbol          = newSymbol;
            properties.StrokeColor     = newStrokeColor;
            properties.StrokeThickness = newStrokeThickness;

            // Assert
            Assert.AreEqual(newColor, chartPointData.Style.Color);
            Assert.AreEqual(newSize, chartPointData.Style.Size);
            Assert.AreEqual(newSymbol, chartPointData.Style.Symbol);
            Assert.AreEqual(newStrokeColor, chartPointData.Style.StrokeColor);
            Assert.AreEqual(newStrokeThickness, chartPointData.Style.StrokeThickness);
            mocks.VerifyAll();
        }
Пример #27
0
        public void GivenChartPointDataSeries_WhenUpdatedAndChartPointDataPointsNotChanged_PreviousChartPointDataSeriesPointsPreserved()
        {
            // Given
            var chartPointData = new ChartPointData("Test name")
            {
                Points = new[]
                {
                    new Point2D(1.1, 2.2)
                }
            };

            var chartPointDataSeries            = new ChartPointDataSeries(chartPointData);
            IEnumerable <DataPoint> drawnPoints = chartPointDataSeries.ItemsSource.Cast <DataPoint>();

            // When
            chartPointDataSeries.Update();

            // Then
            CollectionAssert.AreEqual(drawnPoints, chartPointDataSeries.ItemsSource.Cast <DataPoint>());
        }
Пример #28
0
        public void ConvertSeriesProperties_ChartPointStyleSetWithDifferentChartPointSymbols_AppliesStyleToSeries(ChartPointSymbol symbol, MarkerType expectedMarkerType)
        {
            // Setup
            var converter  = new ChartPointDataConverter();
            var lineSeries = new LineSeries();
            var data       = new ChartPointData("test", new ChartPointStyle
            {
                Color           = Color.Red,
                StrokeColor     = Color.Red,
                Size            = 3,
                StrokeThickness = 2,
                Symbol          = symbol
            });

            // Call
            converter.ConvertSeriesProperties(data, lineSeries);

            // Assert
            Assert.AreEqual(expectedMarkerType, lineSeries.MarkerType);
        }
Пример #29
0
        public void ConvertSeriesProperties_ChartPointStyleSetWithDifferentStrokeThickness_AppliesStyleToSeries(int strokeThickness)
        {
            // Setup
            var converter  = new ChartPointDataConverter();
            var lineSeries = new LineSeries();
            var data       = new ChartPointData("test", new ChartPointStyle
            {
                Color           = Color.Red,
                StrokeColor     = Color.Red,
                Size            = 3,
                StrokeThickness = strokeThickness,
                Symbol          = ChartPointSymbol.Circle
            });

            // Call
            converter.ConvertSeriesProperties(data, lineSeries);

            // Assert
            Assert.AreEqual(strokeThickness, lineSeries.MarkerStrokeThickness);
        }
Пример #30
0
        public void Remove_NotExistingItem_DoesNotRemove()
        {
            // Setup
            var item                = new ChartLineData("test");
            var otherItem           = new ChartPointData("another test");
            var chartDataCollection = new ChartDataCollection("test");

            chartDataCollection.Add(item);

            // Precondition
            Assert.AreEqual(1, chartDataCollection.Collection.Count());
            Assert.IsInstanceOf <ChartLineData>(chartDataCollection.Collection.First());
            List <ChartData> listBeforeRemove = chartDataCollection.Collection.ToList();

            // Call
            chartDataCollection.Remove(otherItem);

            // Assert
            CollectionAssert.AreEqual(listBeforeRemove, chartDataCollection.Collection);
        }