/// <summary> /// Creates the failure mechanism section assembly group boundaries. /// </summary> /// <param name="signalFloodingProbability">The signal flooding probability to use in the calculation.</param> /// <param name="maximumAllowableFloodingProbability">The maximum allowable flooding probability to use in the calculation.</param> /// <returns>A collection of <see cref="FailureMechanismSectionAssemblyGroupBoundaries"/>.</returns> /// <exception cref="AssemblyException">Thrown when an error occurred while creating the assembly group boundaries.</exception> public static IEnumerable <FailureMechanismSectionAssemblyGroupBoundaries> CreateFailureMechanismSectionAssemblyGroupBoundaries( double signalFloodingProbability, double maximumAllowableFloodingProbability) { IFailureMechanismSectionAssemblyGroupBoundariesCalculator calculator = AssemblyToolCalculatorFactory.Instance.CreateFailureMechanismSectionAssemblyGroupBoundariesCalculator( AssemblyToolKernelFactory.Instance); try { return(calculator.CalculateFailureMechanismSectionAssemblyGroupBoundaries(signalFloodingProbability, maximumAllowableFloodingProbability)); } catch (AssessmentSectionAssemblyGroupBoundariesCalculatorException e) { throw new AssemblyException(e.Message, e); } }
public void CreateFailureMechanismSectionAssemblyGroupBoundariesCalculator_WithKernelFactory_ReturnsCalculator() { // Setup IAssemblyToolCalculatorFactory factory = AssemblyToolCalculatorFactory.Instance; using (new AssemblyToolKernelFactoryConfig()) { // Call IFailureMechanismSectionAssemblyGroupBoundariesCalculator calculator = factory.CreateFailureMechanismSectionAssemblyGroupBoundariesCalculator( AssemblyToolKernelFactory.Instance); // Assert Assert.IsInstanceOf <FailureMechanismSectionAssemblyGroupBoundariesCalculator>(calculator); } }