Ejemplo n.º 1
0
        /// <summary>
        /// Asserts whether <paramref name="actual"/> is equal to <paramref name="expected"/>.
        /// </summary>
        /// <param name="expected">The expected collection of <see cref="PreConstructionStage"/>.</param>
        /// <param name="actual">The actual collection of <see cref="PreConstructionStage"/>.</param>
        /// <exception cref="AssertionException">Thrown when <paramref name="actual"/>
        /// is not equal to <paramref name="expected"/>.</exception>
        private static void AssertPreConstructionStages(ICollection <PreConstructionStage> expected, ICollection <PreConstructionStage> actual)
        {
            Assert.AreEqual(expected.Count, actual.Count);

            for (int i = 0; i < expected.Count; i++)
            {
                PreConstructionStage expectedPreConstructionStage = expected.ElementAt(i);
                PreConstructionStage actualPreConstructionStage   = actual.ElementAt(i);

                Assert.AreEqual(expectedPreConstructionStage.CreateWaternet, actualPreConstructionStage.CreateWaternet);
                KernelInputAssert.AssertSurfaceLine(expectedPreConstructionStage.SurfaceLine, actualPreConstructionStage.SurfaceLine);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Asserts whether <paramref name="actual"/> is equal to <paramref name="expected"/>.
        /// </summary>
        /// <param name="expected">The expected collection of <see cref="ConstructionStage"/>.</param>
        /// <param name="actual">The actual collection of <see cref="ConstructionStage"/>.</param>
        /// <exception cref="AssertionException">Thrown when <paramref name="actual"/>
        /// is not equal to <paramref name="expected"/>.</exception>
        private static void AssertConstructionStages(ICollection <ConstructionStage> expected, ICollection <ConstructionStage> actual)
        {
            Assert.AreEqual(expected.Count, actual.Count);

            for (var i = 0; i < expected.Count; i++)
            {
                ConstructionStage expectedConstructionStage = expected.ElementAt(i);
                ConstructionStage actualConstructionStage   = actual.ElementAt(i);

                KernelInputAssert.AssertSoilProfile(expectedConstructionStage.SoilProfile, actualConstructionStage.SoilProfile);
                Assert.AreEqual(expectedConstructionStage.Waternet, actualConstructionStage.Waternet);
                CollectionAssert.AreEqual(expectedConstructionStage.FixedSoilStresses, actualConstructionStage.FixedSoilStresses, new FixedSoilStressComparer());
                CollectionAssert.AreEqual(expectedConstructionStage.PreconsolidationStresses, actualConstructionStage.PreconsolidationStresses, new PreconsolidationStressComparer());

                AssertMultiplicationFactorsCPhiForUplift(expectedConstructionStage.MultiplicationFactorsCPhiForUplift.Single(),
                                                         actualConstructionStage.MultiplicationFactorsCPhiForUplift.Single());
            }
        }