public void CreateUpliftVanKernel_Always_ReturnsUpliftVanKernelWrapper() { // Setup IMacroStabilityInwardsKernelFactory factory = MacroStabilityInwardsKernelWrapperFactory.Instance; // Call IUpliftVanKernel upliftVanKernel = factory.CreateUpliftVanKernel(new MacroStabilityInput()); // Assert Assert.IsInstanceOf <UpliftVanKernelWrapper>(upliftVanKernel); }
public IEnumerable <MacroStabilityInwardsKernelMessage> Validate() { try { IUpliftVanKernel upliftVanKernel = CreateUpliftVanKernel(); return(MacroStabilityInwardsKernelMessagesCreator.Create(upliftVanKernel.Validate().ToArray())); } catch (UpliftVanKernelWrapperException e) { throw new UpliftVanCalculatorException(e.Message, e); } }
private IUpliftVanKernel CalculateUpliftVan() { IUpliftVanKernel upliftVanKernel = CreateUpliftVanKernel(); try { upliftVanKernel.Calculate(); } catch (UpliftVanKernelWrapperException e) { throw new UpliftVanCalculatorException(e.Message, e, MacroStabilityInwardsKernelMessagesCreator.Create(e.Messages)); } return(upliftVanKernel); }
public UpliftVanCalculatorResult Calculate() { IUpliftVanKernel upliftVanKernel = CalculateUpliftVan(); return(new UpliftVanCalculatorResult( UpliftVanSlidingCurveResultCreator.Create(upliftVanKernel.SlidingCurveResult), UpliftVanCalculationGridResultCreator.Create(upliftVanKernel.UpliftVanCalculationGridResult), MacroStabilityInwardsKernelMessagesCreator.Create(upliftVanKernel.CalculationMessages), new UpliftVanCalculatorResult.ConstructionProperties { FactorOfStability = upliftVanKernel.FactorOfStability, ForbiddenZonesXEntryMin = upliftVanKernel.ForbiddenZonesXEntryMin, ForbiddenZonesXEntryMax = upliftVanKernel.ForbiddenZonesXEntryMax })); }