Exemplo n.º 1
0
        public void Clone_AllPropertiesSet_ReturnNewInstanceWithCopiedValues()
        {
            // Setup
            var surfaceLine = new MacroStabilityInwardsSurfaceLine("Surface line");

            surfaceLine.SetGeometry(new[]
            {
                new Point3D(0, 0, 0),
                new Point3D(1, 1, 1)
            });

            MacroStabilityInwardsStochasticSoilModel   stochasticSoilModel   = MacroStabilityInwardsStochasticSoilModelTestFactory.CreateValidStochasticSoilModel();
            MacroStabilityInwardsStochasticSoilProfile stochasticSoilProfile = stochasticSoilModel.StochasticSoilProfiles.First();

            // Precondition
            Assert.IsNotNull(stochasticSoilProfile);

            var original = new MacroStabilityInwardsInput(new MacroStabilityInwardsInput.ConstructionProperties());

            MacroStabilityInwardsTestDataGenerator.SetRandomMacroStabilityInwardsInput(original);

            // Call
            object clone = original.Clone();

            // Assert
            CoreCloneAssert.AreObjectClones(original, clone, MacroStabilityInwardsCloneAssert.AreClones);
        }
Exemplo n.º 2
0
        public void Clone_Always_ReturnNewInstanceWithCopiedValues()
        {
            // Setup
            var random   = new Random(21);
            var original = new GeneralResult <TopLevelIllustrationPointBase>(WindDirectionTestFactory.CreateTestWindDirection(),
                                                                             new[]
            {
                new Stochast("Random name 1",
                             random.NextDouble(),
                             random.NextDouble()),
                new Stochast("Random name 2",
                             random.NextDouble(),
                             random.NextDouble())
            },
                                                                             new[]
            {
                new TestTopLevelIllustrationPoint("situation 1"),
                new TestTopLevelIllustrationPoint("situation 2")
            });

            // Call
            object clone = original.Clone();

            // Assert
            CoreCloneAssert.AreObjectClones(original, clone, CommonCloneAssert.AreClones);
        }
Exemplo n.º 3
0
        public void Clone_Always_ReturnNewInstanceWithCopiedValues()
        {
            // Setup
            var random   = new Random(21);
            var original = new SubMechanismIllustrationPoint("Random name",
                                                             random.NextDouble(),
                                                             new[]
            {
                new SubMechanismIllustrationPointStochast("Random name 1",
                                                          "-",
                                                          random.NextDouble(),
                                                          random.NextDouble(),
                                                          random.NextDouble()),
                new SubMechanismIllustrationPointStochast("Random name 2",
                                                          "-",
                                                          random.NextDouble(),
                                                          random.NextDouble(),
                                                          random.NextDouble())
            },
                                                             new[]
            {
                new IllustrationPointResult("Random description 1",
                                            "-",
                                            random.NextDouble()),
                new IllustrationPointResult("Random description 2",
                                            "-",
                                            random.NextDouble())
            });

            // Call
            object clone = original.Clone();

            // Assert
            CoreCloneAssert.AreObjectClones(original, clone, CommonCloneAssert.AreClones);
        }
Exemplo n.º 4
0
 /// <summary>
 /// Method that asserts whether <paramref name="original"/> and <paramref name="clone"/>
 /// are clones.
 /// </summary>
 /// <param name="original">The original object.</param>
 /// <param name="clone">The cloned object.</param>
 /// <exception cref="AssertionException">Thrown when <paramref name="original"/> and
 /// <paramref name="clone"/> are not clones.</exception>
 public static void AreClones(OvertoppingOutput original, OvertoppingOutput clone)
 {
     Assert.AreEqual(original.WaveHeight, clone.WaveHeight);
     Assert.AreEqual(original.IsOvertoppingDominant, clone.IsOvertoppingDominant);
     Assert.AreEqual(original.Reliability, clone.Reliability);
     CoreCloneAssert.AreObjectClones(original.GeneralResult, clone.GeneralResult, CommonCloneAssert.AreClones);
 }
Exemplo n.º 5
0
        public void Clone_Always_ReturnNewInstanceWithCopiedValues()
        {
            // Setup
            var original = new CalculationGroup
            {
                Name     = "Random group name",
                Children =
                {
                    new TestCalculationBase
                    {
                        Name = "Random item name 1"
                    },
                    new TestCalculationBase
                    {
                        Name = "Random item name 2"
                    }
                }
            };

            // Call
            object clone = original.Clone();

            // Assert
            CoreCloneAssert.AreObjectClones(original, clone, CommonCloneAssert.AreClones);
        }
Exemplo n.º 6
0
 /// <summary>
 /// Method that asserts whether <paramref name="original"/> and <paramref name="clone"/>
 /// are clones.
 /// </summary>
 /// <param name="original">The original object.</param>
 /// <param name="clone">The cloned object.</param>
 /// <exception cref="AssertionException">Thrown when <paramref name="original"/> and
 /// <paramref name="clone"/> are not clones.</exception>
 public static void AreClones(GrassCoverErosionInwardsCalculation original, GrassCoverErosionInwardsCalculation clone)
 {
     Assert.AreEqual(original.Name, clone.Name);
     CoreCloneAssert.AreObjectClones(original.Comments, clone.Comments, CommonCloneAssert.AreClones);
     CoreCloneAssert.AreObjectClones(original.InputParameters, clone.InputParameters, AreClones);
     CoreCloneAssert.AreObjectClones(original.Output, clone.Output, AreClones);
 }
Exemplo n.º 7
0
        public void Clone_Always_ReturnNewInstanceWithCopiedValues()
        {
            // Setup
            var random       = new Random(21);
            var slidingCurve = new MacroStabilityInwardsSlidingCurve(MacroStabilityInwardsSlidingCircleTestFactory.Create(),
                                                                     MacroStabilityInwardsSlidingCircleTestFactory.Create(),
                                                                     new[]
            {
                MacroStabilityInwardsSliceTestFactory.CreateSlice()
            },
                                                                     random.NextDouble(),
                                                                     random.NextDouble());

            var slipPlane = new MacroStabilityInwardsSlipPlaneUpliftVan(MacroStabilityInwardsGridTestFactory.Create(),
                                                                        MacroStabilityInwardsGridTestFactory.Create(),
                                                                        new[]
            {
                random.NextRoundedDouble()
            });

            var properties = new MacroStabilityInwardsOutput.ConstructionProperties
            {
                FactorOfStability       = random.NextDouble(),
                ForbiddenZonesXEntryMin = random.NextDouble(),
                ForbiddenZonesXEntryMax = random.NextDouble()
            };

            var original = new MacroStabilityInwardsOutput(slidingCurve, slipPlane, properties);

            // Call
            object clone = original.Clone();

            // Assert
            CoreCloneAssert.AreObjectClones(original, clone, MacroStabilityInwardsCloneAssert.AreClones);
        }
Exemplo n.º 8
0
        /// <summary>
        /// Method that asserts whether <paramref name="original"/> and <paramref name="clone"/>
        /// are clones.
        /// </summary>
        /// <param name="original">The original object.</param>
        /// <param name="clone">The cloned object.</param>
        /// <exception cref="AssertionException">Thrown when <paramref name="original"/> and
        /// <paramref name="clone"/> are not clones.</exception>
        public static void AreClones(StabilityPointStructuresInput original, StabilityPointStructuresInput clone)
        {
            CommonCloneAssert.AreClones(original, clone);

            CoreCloneAssert.AreObjectClones(original.InsideWaterLevelFailureConstruction, clone.InsideWaterLevelFailureConstruction, DistributionAssert.AreEqual);
            CoreCloneAssert.AreObjectClones(original.InsideWaterLevel, clone.InsideWaterLevel, DistributionAssert.AreEqual);
            CoreCloneAssert.AreObjectClones(original.DrainCoefficient, clone.DrainCoefficient, DistributionAssert.AreEqual);
            CoreCloneAssert.AreObjectClones(original.LevelCrestStructure, clone.LevelCrestStructure, DistributionAssert.AreEqual);
            CoreCloneAssert.AreObjectClones(original.ThresholdHeightOpenWeir, clone.ThresholdHeightOpenWeir, DistributionAssert.AreEqual);
            CoreCloneAssert.AreObjectClones(original.AreaFlowApertures, clone.AreaFlowApertures, DistributionAssert.AreEqual);
            CoreCloneAssert.AreObjectClones(original.ConstructiveStrengthLinearLoadModel, clone.ConstructiveStrengthLinearLoadModel, DistributionAssert.AreEqual);
            CoreCloneAssert.AreObjectClones(original.ConstructiveStrengthQuadraticLoadModel, clone.ConstructiveStrengthQuadraticLoadModel, DistributionAssert.AreEqual);
            CoreCloneAssert.AreObjectClones(original.StabilityLinearLoadModel, clone.StabilityLinearLoadModel, DistributionAssert.AreEqual);
            CoreCloneAssert.AreObjectClones(original.StabilityQuadraticLoadModel, clone.StabilityQuadraticLoadModel, DistributionAssert.AreEqual);
            CoreCloneAssert.AreObjectClones(original.FailureCollisionEnergy, clone.FailureCollisionEnergy, DistributionAssert.AreEqual);
            CoreCloneAssert.AreObjectClones(original.ShipMass, clone.ShipMass, DistributionAssert.AreEqual);
            CoreCloneAssert.AreObjectClones(original.ShipVelocity, clone.ShipVelocity, DistributionAssert.AreEqual);
            CoreCloneAssert.AreObjectClones(original.BankWidth, clone.BankWidth, DistributionAssert.AreEqual);
            CoreCloneAssert.AreObjectClones(original.FlowVelocityStructureClosable, clone.FlowVelocityStructureClosable, DistributionAssert.AreEqual);
            Assert.AreEqual(original.VolumicWeightWater, clone.VolumicWeightWater);
            Assert.AreEqual(original.FactorStormDurationOpenStructure, clone.FactorStormDurationOpenStructure);
            Assert.AreEqual(original.EvaluationLevel, clone.EvaluationLevel);
            Assert.AreEqual(original.VerticalDistance, clone.VerticalDistance);
            Assert.AreEqual(original.FailureProbabilityRepairClosure, clone.FailureProbabilityRepairClosure);
            Assert.AreEqual(original.ProbabilityCollisionSecondaryStructure, clone.ProbabilityCollisionSecondaryStructure);
            Assert.AreEqual(original.InflowModelType, clone.InflowModelType);
            Assert.AreEqual(original.LoadSchematizationType, clone.LoadSchematizationType);
            Assert.AreEqual(original.LevellingCount, clone.LevellingCount);
        }
Exemplo n.º 9
0
 /// <summary>
 /// Method that asserts whether <paramref name="original"/> and <paramref name="clone"/>
 /// are clones.
 /// </summary>
 /// <param name="original">The original object.</param>
 /// <param name="clone">The cloned object.</param>
 /// <exception cref="AssertionException">Thrown when <paramref name="original"/> and
 /// <paramref name="clone"/> are not clones.</exception>
 /// <typeparam name="T">The type of the top level illustration point.</typeparam>
 public static void AreClones <T>(GeneralResult <T> original, GeneralResult <T> clone)
     where T : TopLevelIllustrationPointBase
 {
     CoreCloneAssert.AreObjectClones(original.GoverningWindDirection, clone.GoverningWindDirection, AreClones);
     CoreCloneAssert.AreEnumerationClones(original.Stochasts, clone.Stochasts, AreClones);
     CoreCloneAssert.AreEnumerationClones(original.TopLevelIllustrationPoints, clone.TopLevelIllustrationPoints, AreClones);
 }
Exemplo n.º 10
0
 /// <summary>
 /// Method that asserts whether <paramref name="original"/> and <paramref name="clone"/>
 /// are clones.
 /// </summary>
 /// <param name="original">The original object.</param>
 /// <param name="clone">The cloned object.</param>
 /// <exception cref="AssertionException">Thrown when <paramref name="original"/> and
 /// <paramref name="clone"/> are not clones.</exception>
 public static void AreClones(WaveImpactAsphaltCoverWaveConditionsCalculation original, WaveImpactAsphaltCoverWaveConditionsCalculation clone)
 {
     Assert.AreEqual(original.Name, clone.Name);
     CoreCloneAssert.AreObjectClones(original.Comments, clone.Comments, CommonCloneAssert.AreClones);
     CoreCloneAssert.AreObjectClones(original.InputParameters, clone.InputParameters, WaveConditionsCloneAssert.AreClones);
     CoreCloneAssert.AreObjectClones(original.Output, clone.Output, AreClones);
 }
Exemplo n.º 11
0
        /// <summary>
        /// Method that asserts whether <paramref name="original"/> and <paramref name="clone"/>
        /// are clones.
        /// </summary>
        /// <param name="original">The original object.</param>
        /// <param name="clone">The cloned object.</param>
        /// <exception cref="AssertionException">Thrown when <paramref name="original"/> and
        /// <paramref name="clone"/> are not clones.</exception>
        public static void AreClones(HeightStructuresInput original, HeightStructuresInput clone)
        {
            CommonCloneAssert.AreClones(original, clone);

            Assert.AreEqual(original.DeviationWaveDirection, clone.DeviationWaveDirection);
            CoreCloneAssert.AreObjectClones(original.ModelFactorSuperCriticalFlow, clone.ModelFactorSuperCriticalFlow, DistributionAssert.AreEqual);
            CoreCloneAssert.AreObjectClones(original.LevelCrestStructure, clone.LevelCrestStructure, DistributionAssert.AreEqual);
        }
 /// <summary>
 /// Method that asserts whether <paramref name="original"/> and <paramref name="clone"/>
 /// are clones.
 /// </summary>
 /// <param name="original">The original object.</param>
 /// <param name="clone">The cloned object.</param>
 /// <exception cref="AssertionException">Thrown when <paramref name="original"/> and
 /// <paramref name="clone"/> are not clones.</exception>
 public static void AreClones(MacroStabilityInwardsCalculation original,
                              MacroStabilityInwardsCalculation clone)
 {
     Assert.AreEqual(original.Name, clone.Name);
     CoreCloneAssert.AreObjectClones(original.Comments, clone.Comments, CommonCloneAssert.AreClones);
     CoreCloneAssert.AreObjectClones(original.InputParameters, clone.InputParameters, AreClones);
     CoreCloneAssert.AreObjectClones(original.Output, clone.Output, AreClones);
 }
Exemplo n.º 13
0
 /// <summary>
 /// Method that asserts whether <paramref name="original"/> and <paramref name="clone"/>
 /// are clones.
 /// </summary>
 /// <param name="original">The original object.</param>
 /// <param name="clone">The cloned object.</param>
 /// <exception cref="AssertionException">Thrown when <paramref name="original"/> and
 /// <paramref name="clone"/> are not clones.</exception>
 public static void AreClones(HydraulicLoadsOutput original, HydraulicLoadsOutput clone)
 {
     Assert.AreEqual(original.TargetProbability, clone.TargetProbability);
     Assert.AreEqual(original.TargetReliability, clone.TargetReliability);
     Assert.AreEqual(original.CalculatedProbability, clone.CalculatedProbability);
     Assert.AreEqual(original.CalculatedReliability, clone.CalculatedReliability);
     Assert.AreEqual(original.CalculationConvergence, clone.CalculationConvergence);
     CoreCloneAssert.AreObjectClones(original.GeneralResult, clone.GeneralResult, CommonCloneAssert.AreClones);
 }
Exemplo n.º 14
0
 /// <summary>
 /// Method that asserts whether <paramref name="original"/> and <paramref name="clone"/>
 /// are clones.
 /// </summary>
 /// <typeparam name="TInput">The type of structures input.</typeparam>
 /// <typeparam name="TStructure">The type of the structure contained by the structures input.</typeparam>
 /// <param name="original">The original object.</param>
 /// <param name="clone">The cloned object.</param>
 /// <exception cref="AssertionException">Thrown when <paramref name="original"/> and
 /// <paramref name="clone"/> are not clones.</exception>
 public static void AreClones <TInput, TStructure>(StructuresCalculation <TInput> original, StructuresCalculation <TInput> clone)
     where TInput : StructuresInputBase <TStructure>, new()
     where TStructure : StructureBase, new()
 {
     Assert.AreEqual(original.Name, clone.Name);
     CoreCloneAssert.AreObjectClones(original.Comments, clone.Comments, AreClones);
     CoreCloneAssert.AreObjectClones(original.InputParameters, clone.InputParameters, AreClones);
     CoreCloneAssert.AreObjectClones(original.Output, clone.Output, AreClones);
 }
        /// <summary>
        /// Method that asserts whether <paramref name="original"/> and <paramref name="clone"/>
        /// are clones.
        /// </summary>
        /// <param name="original">The original object.</param>
        /// <param name="clone">The cloned object.</param>
        /// <exception cref="AssertionException">Thrown when <paramref name="original"/> and
        /// <paramref name="clone"/> are not clones.</exception>
        public static void AreClones(MacroStabilityInwardsInput original,
                                     MacroStabilityInwardsInput clone)
        {
            Assert.AreSame(original.HydraulicBoundaryLocation, clone.HydraulicBoundaryLocation);
            Assert.AreSame(original.StochasticSoilModel, clone.StochasticSoilModel);
            Assert.AreSame(original.StochasticSoilProfile, clone.StochasticSoilProfile);
            Assert.AreSame(original.SurfaceLine, clone.SurfaceLine);

            Assert.AreEqual(original.AssessmentLevel, clone.AssessmentLevel);
            Assert.AreEqual(original.UseAssessmentLevelManualInput, clone.UseAssessmentLevelManualInput);

            Assert.AreEqual(original.SlipPlaneMinimumDepth, clone.SlipPlaneMinimumDepth);
            Assert.AreEqual(original.SlipPlaneMinimumLength, clone.SlipPlaneMinimumLength);
            Assert.AreEqual(original.MaximumSliceWidth, clone.MaximumSliceWidth);

            Assert.AreEqual(original.MoveGrid, clone.MoveGrid);
            Assert.AreEqual(original.DikeSoilScenario, clone.DikeSoilScenario);

            Assert.AreEqual(original.WaterLevelRiverAverage, clone.WaterLevelRiverAverage);

            Assert.AreEqual(original.DrainageConstructionPresent, clone.DrainageConstructionPresent);
            Assert.AreEqual(original.XCoordinateDrainageConstruction, clone.XCoordinateDrainageConstruction);
            Assert.AreEqual(original.ZCoordinateDrainageConstruction, clone.ZCoordinateDrainageConstruction);

            Assert.AreEqual(original.MinimumLevelPhreaticLineAtDikeTopRiver, clone.MinimumLevelPhreaticLineAtDikeTopRiver);
            Assert.AreEqual(original.MinimumLevelPhreaticLineAtDikeTopPolder, clone.MinimumLevelPhreaticLineAtDikeTopPolder);

            CoreCloneAssert.AreObjectClones((MacroStabilityInwardsLocationInputExtreme)original.LocationInputExtreme,
                                            clone.LocationInputExtreme,
                                            AreClones);
            CoreCloneAssert.AreObjectClones((MacroStabilityInwardsLocationInputDaily)original.LocationInputDaily,
                                            clone.LocationInputDaily,
                                            AreClones);

            Assert.AreEqual(original.AdjustPhreaticLine3And4ForUplift, clone.AdjustPhreaticLine3And4ForUplift);
            Assert.AreEqual(original.LeakageLengthOutwardsPhreaticLine3, clone.LeakageLengthOutwardsPhreaticLine3);
            Assert.AreEqual(original.LeakageLengthInwardsPhreaticLine3, clone.LeakageLengthInwardsPhreaticLine3);
            Assert.AreEqual(original.LeakageLengthOutwardsPhreaticLine4, clone.LeakageLengthOutwardsPhreaticLine4);
            Assert.AreEqual(original.LeakageLengthInwardsPhreaticLine4, clone.LeakageLengthInwardsPhreaticLine4);
            Assert.AreEqual(original.PiezometricHeadPhreaticLine2Outwards, clone.PiezometricHeadPhreaticLine2Outwards);
            Assert.AreEqual(original.PiezometricHeadPhreaticLine2Inwards, clone.PiezometricHeadPhreaticLine2Inwards);

            Assert.AreEqual(original.GridDeterminationType, clone.GridDeterminationType);
            Assert.AreEqual(original.TangentLineDeterminationType, clone.TangentLineDeterminationType);

            Assert.AreEqual(original.TangentLineZTop, clone.TangentLineZTop);
            Assert.AreEqual(original.TangentLineZBottom, clone.TangentLineZBottom);
            Assert.AreEqual(original.TangentLineNumber, clone.TangentLineNumber);

            CoreCloneAssert.AreObjectClones(original.LeftGrid, clone.LeftGrid, AreClones);
            CoreCloneAssert.AreObjectClones(original.RightGrid, clone.RightGrid, AreClones);

            Assert.AreEqual(original.CreateZones, clone.CreateZones);
            Assert.AreEqual(original.ZoningBoundariesDeterminationType, clone.ZoningBoundariesDeterminationType);
            Assert.AreEqual(original.ZoneBoundaryLeft, clone.ZoneBoundaryLeft);
            Assert.AreEqual(original.ZoneBoundaryRight, clone.ZoneBoundaryRight);
        }
 /// <summary>
 /// Method that asserts whether <paramref name="original"/> and <paramref name="clone"/>
 /// are clones.
 /// </summary>
 /// <param name="original">The original object.</param>
 /// <param name="clone">The cloned object.</param>
 /// <exception cref="AssertionException">Thrown when <paramref name="original"/> and
 /// <paramref name="clone"/> are not clones.</exception>
 public static void AreClones(MacroStabilityInwardsSlipPlaneUpliftVan original,
                              MacroStabilityInwardsSlipPlaneUpliftVan clone)
 {
     CoreCloneAssert.AreObjectClones(original.LeftGrid, clone.LeftGrid, AreClones);
     CoreCloneAssert.AreObjectClones(original.RightGrid, clone.RightGrid, AreClones);
     CoreCloneAssert.AreEnumerationClones(original.TangentLines, clone.TangentLines,
                                          (originalTangentLine, clonedTangentLine) =>
                                          Assert.AreEqual(originalTangentLine, clonedTangentLine));
 }
        /// <summary>
        /// Method that asserts whether <paramref name="original"/> and <paramref name="clone"/>
        /// are clones.
        /// </summary>
        /// <param name="original">The original object.</param>
        /// <param name="clone">The cloned object.</param>
        /// <exception cref="AssertionException">Thrown when <paramref name="original"/> and
        /// <paramref name="clone"/> are not clones.</exception>
        public static void AreClones(MacroStabilityInwardsSlidingCurve original,
                                     MacroStabilityInwardsSlidingCurve clone)
        {
            CoreCloneAssert.AreObjectClones(original.LeftCircle, clone.LeftCircle, AreClones);
            CoreCloneAssert.AreObjectClones(original.RightCircle, clone.RightCircle, AreClones);
            CoreCloneAssert.AreEnumerationClones(original.Slices, clone.Slices, AreClones);

            Assert.AreEqual(original.NonIteratedHorizontalForce, clone.NonIteratedHorizontalForce);
            Assert.AreEqual(original.IteratedHorizontalForce, clone.IteratedHorizontalForce);
        }
        /// <summary>
        /// Method that asserts whether <paramref name="original"/> and <paramref name="clone"/>
        /// are clones.
        /// </summary>
        /// <param name="original">The original object.</param>
        /// <param name="clone">The cloned object.</param>
        /// <exception cref="AssertionException">Thrown when <paramref name="original"/> and
        /// <paramref name="clone"/> are not clones.</exception>
        public static void AreClones(MacroStabilityInwardsOutput original,
                                     MacroStabilityInwardsOutput clone)
        {
            CoreCloneAssert.AreObjectClones(original.SlidingCurve, clone.SlidingCurve, AreClones);
            CoreCloneAssert.AreObjectClones(original.SlipPlane, clone.SlipPlane, AreClones);

            Assert.AreEqual(original.FactorOfStability, clone.FactorOfStability);
            Assert.AreEqual(original.ForbiddenZonesXEntryMin, clone.ForbiddenZonesXEntryMin);
            Assert.AreEqual(original.ForbiddenZonesXEntryMax, clone.ForbiddenZonesXEntryMax);
        }
        public void Clone_AllPropertiesSet_ReturnNewInstanceWithCopiedValues()
        {
            // Setup
            GrassCoverErosionInwardsOutput original = GrassCoverErosionInwardsTestDataGenerator.GetRandomGrassCoverErosionInwardsOutput();

            // Call
            object clone = original.Clone();

            // Assert
            CoreCloneAssert.AreObjectClones(original, clone, GrassCoverErosionInwardsCloneAssert.AreClones);
        }
Exemplo n.º 20
0
        public void Clone_AllPropertiesSet_ReturnNewInstanceWithCopiedValues()
        {
            // Setup
            DikeHeightOutput original = GrassCoverErosionInwardsTestDataGenerator.GetRandomDikeHeightOutput(new TestGeneralResultFaultTreeIllustrationPoint());

            // Call
            object clone = original.Clone();

            // Assert
            CoreCloneAssert.AreObjectClones(original, clone, GrassCoverErosionInwardsCloneAssert.AreClones);
        }
        public void Clone_Always_ReturnNewInstanceWithCopiedValues()
        {
            // Setup
            SemiProbabilisticPipingOutput original = PipingTestDataGenerator.GetRandomSemiProbabilisticPipingOutput();

            // Call
            object clone = original.Clone();

            // Assert
            CoreCloneAssert.AreObjectClones(original, clone, PipingCloneAssert.AreClones);
        }
        public void Clone_NotAllPropertiesSet_ReturnNewInstanceWithCopiedValues()
        {
            // Setup
            ProbabilisticPipingCalculationScenario original = CreateRandomCalculationScenarioWithoutOutput();

            // Call
            object clone = original.Clone();

            // Assert
            CoreCloneAssert.AreObjectClones(original, clone, PipingCloneAssert.AreClones);
        }
Exemplo n.º 23
0
        public void Clone_AllPropertiesSet_ReturnNewInstanceWithCopiedValues()
        {
            // Setup
            WaveConditionsOutput original = WaveConditionsTestDataGenerator.GetRandomWaveConditionsOutput();

            // Call
            object clone = original.Clone();

            // Assert
            CoreCloneAssert.AreObjectClones(original, clone, WaveConditionsCloneAssert.AreClones);
        }
Exemplo n.º 24
0
        public void Clone_NotAllPropertiesSet_ReturnNewInstanceWithCopiedValues()
        {
            // Setup
            var original = new GrassCoverErosionOutwardsWaveConditionsCalculation();

            // Call
            object clone = original.Clone();

            // Assert
            CoreCloneAssert.AreObjectClones(original, clone, GrassCoverErosionOutwardsCloneAssert.AreClones);
        }
        public void Clone_OutputNull_ReturnNewInstanceWithCopiedValues()
        {
            // Setup
            var original = new StabilityStoneCoverWaveConditionsOutput(null, null);

            // Call
            object clone = original.Clone();

            // Assert
            CoreCloneAssert.AreObjectClones(original, clone, StabilityStoneCoverCloneAssert.AreClones);
        }
        public void Clone_NotAllPropertiesSet_ReturnNewInstanceWithCopiedValues()
        {
            // Setup
            var original = new WaveImpactAsphaltCoverWaveConditionsCalculation();

            // Call
            object clone = original.Clone();

            // Assert
            CoreCloneAssert.AreObjectClones(original, clone, WaveImpactAsphaltCoverCloneAssert.AreClones);
        }
        public void Clone_AllPropertiesSet_ReturnNewInstanceWithCopiedValues()
        {
            // Setup
            ProbabilisticPipingOutput original = PipingTestDataGenerator.GetRandomProbabilisticPipingOutputWithIllustrationPoints();

            // Call
            object clone = original.Clone();

            // Assert
            CoreCloneAssert.AreObjectClones(original, clone, PipingCloneAssert.AreClones);
        }
Exemplo n.º 28
0
        public void Clone_Always_ReturnNewInstanceWithCopiedValues()
        {
            // Setup
            var original = new MacroStabilityInwardsLocationInputDaily();

            // Call
            object clone = original.Clone();

            // Assert
            CoreCloneAssert.AreObjectClones(original, clone, MacroStabilityInwardsCloneAssert.AreClones);
        }
Exemplo n.º 29
0
        public void Clone_Always_ReturnNewInstanceWithCopiedValues()
        {
            // Setup
            WaveImpactAsphaltCoverWaveConditionsOutput original = WaveImpactAsphaltCoverTestDataGenerator.GetRandomWaveImpactAsphaltCoverWaveConditionsOutput();

            // Call
            object clone = original.Clone();

            // Assert
            CoreCloneAssert.AreObjectClones(original, clone, WaveImpactAsphaltCoverCloneAssert.AreClones);
        }
Exemplo n.º 30
0
        public void Clone_NotAllPropertiesSet_ReturnNewInstanceWithCopiedValues()
        {
            // Setup
            MacroStabilityInwardsCalculation original = CreateRandomCalculationWithoutOutput();

            // Call
            object clone = original.Clone();

            // Assert
            CoreCloneAssert.AreObjectClones(original, clone, MacroStabilityInwardsCloneAssert.AreClones);
        }