Ejemplo n.º 1
0
        public void ClearIllustrationPoints_CalculationWithoutOutput_DoesNotThrow()
        {
            // Setup
            var calculation = new TestProbabilisticPipingCalculation();

            // Call
            void Call() => calculation.ClearIllustrationPoints();

            // Assert
            Assert.DoesNotThrow(Call);
        }
Ejemplo n.º 2
0
        public void ClearIllustrationPoints_CalculationWithOutput_ClearsIllustrationPointResult()
        {
            // Setup
            PartialProbabilisticPipingOutput <TestTopLevelIllustrationPoint> sectionSpecificOutput = PipingTestDataGenerator.GetRandomPartialProbabilisticPipingOutput();
            PartialProbabilisticPipingOutput <TestTopLevelIllustrationPoint> profileSpecificOutput = PipingTestDataGenerator.GetRandomPartialProbabilisticPipingOutput();
            var output      = new ProbabilisticPipingOutput(sectionSpecificOutput, profileSpecificOutput);
            var calculation = new TestProbabilisticPipingCalculation
            {
                Output = output
            };

            // Call
            calculation.ClearIllustrationPoints();

            // Assert
            Assert.AreSame(output, calculation.Output);
            Assert.IsNull(((PartialProbabilisticPipingOutput <TestTopLevelIllustrationPoint>)output.SectionSpecificOutput).GeneralResult);
            Assert.IsNull(((PartialProbabilisticPipingOutput <TestTopLevelIllustrationPoint>)output.ProfileSpecificOutput).GeneralResult);
        }