public void CreateForeshoreGeometryPoints_InputNull_ReturnsEmptyCollection()
        {
            // Call
            IEnumerable <Point2D> points = GrassCoverErosionInwardsChartDataPointsFactory.CreateForeshoreGeometryPoints(null);

            // Assert
            CollectionAssert.IsEmpty(points);
        }
コード例 #2
0
        private void SetChartData()
        {
            GrassCoverErosionInwardsInput input = data.InputParameters;
            DikeProfile dikeProfile             = input.DikeProfile;

            GrassCoverErosionInwardsChartDataFactory.UpdateForeshoreGeometryChartDataName(foreshoreChartData, input);
            GrassCoverErosionInwardsChartDataFactory.UpdateDikeGeometryChartDataName(dikeGeometryChartData, dikeProfile);

            foreshoreChartData.Points    = GrassCoverErosionInwardsChartDataPointsFactory.CreateForeshoreGeometryPoints(input);
            dikeGeometryChartData.Points = GrassCoverErosionInwardsChartDataPointsFactory.CreateDikeGeometryPoints(dikeProfile);
            dikeHeightChartData.Points   = GrassCoverErosionInwardsChartDataPointsFactory.CreateDikeHeightPoints(input);
        }
        public void CreateForeshoreGeometryPoints_DikeProfileNull_ReturnsEmptyCollection()
        {
            // Setup
            var input = new GrassCoverErosionInwardsInput
            {
                UseForeshore = true
            };

            // Call
            IEnumerable <Point2D> points = GrassCoverErosionInwardsChartDataPointsFactory.CreateForeshoreGeometryPoints(input);

            // Assert
            CollectionAssert.IsEmpty(points);
        }
        public void CreateForeshoreGeometryPoints_DikeProfileSetUseForeshoreFalse_ReturnsEmptyCollection()
        {
            // Setup
            var input = new GrassCoverErosionInwardsInput
            {
                DikeProfile = DikeProfileTestFactory.CreateDikeProfile(new[]
                {
                    new Point2D(1.1, 2.2),
                    new Point2D(3.3, 4.4)
                }),
                UseForeshore = false
            };

            // Call
            IEnumerable <Point2D> points = GrassCoverErosionInwardsChartDataPointsFactory.CreateForeshoreGeometryPoints(input);

            // Assert
            CollectionAssert.IsEmpty(points);
        }
        public void CreateForeshoreGeometryPoints_DikeProfileSetUseForeshoreTrue_ReturnsForeshoreGeometryCollection()
        {
            // Setup
            var foreshoreGeometry = new[]
            {
                new Point2D(1.1, 2.2),
                new Point2D(3.3, 4.4)
            };
            var input = new GrassCoverErosionInwardsInput
            {
                DikeProfile  = DikeProfileTestFactory.CreateDikeProfile(foreshoreGeometry),
                UseForeshore = true
            };

            // Call
            IEnumerable <Point2D> points = GrassCoverErosionInwardsChartDataPointsFactory.CreateForeshoreGeometryPoints(input);

            // Assert
            CollectionAssert.AreEqual(foreshoreGeometry, points);
        }