Ejemplo n.º 1
0
        public void ConvertFailureMechanismSectionResultFurtherAnalysisType_ValidFailureMechanismSectionResultFurtherAnalysisType_ReturnsExpectedRefinementStatus(
            FailureMechanismSectionResultFurtherAnalysisType furtherAnalysisType, ERefinementStatus expectedRefinementStatus)
        {
            // Call
            ERefinementStatus refinementStatus = FailureMechanismSectionAssemblyCalculatorInputCreator.ConvertFailureMechanismSectionResultFurtherAnalysisType(furtherAnalysisType);

            // Assert
            Assert.AreEqual(expectedRefinementStatus, refinementStatus);
        }
Ejemplo n.º 2
0
        public void ConvertFailureMechanismSectionResultFurtherAnalysisType_InvalidFailureMechanismSectionResultFurtherAnalysisType_ThrowsInvalidEnumArgumentException()
        {
            // Setup
            const FailureMechanismSectionResultFurtherAnalysisType furtherAnalysisType = (FailureMechanismSectionResultFurtherAnalysisType)99;

            // Call
            void Call() => FailureMechanismSectionAssemblyCalculatorInputCreator.ConvertFailureMechanismSectionResultFurtherAnalysisType(furtherAnalysisType);

            // Assert
            var expectedMessage = $"The value of argument 'furtherAnalysisType' ({furtherAnalysisType}) is invalid for Enum type '{nameof(FailureMechanismSectionResultFurtherAnalysisType)}'.";

            TestHelper.AssertThrowsArgumentExceptionAndTestMessage <InvalidEnumArgumentException>(Call, expectedMessage);
        }