public void Constructor_ValidParameters_ExpectedValues() { // Setup var hydraulicBoundaryLocationCalculation = new HydraulicBoundaryLocationCalculation(new TestHydraulicBoundaryLocation()); // Call var context = new WaveHeightCalculationContext(hydraulicBoundaryLocationCalculation); // Assert Assert.IsInstanceOf <HydraulicBoundaryLocationCalculationContext>(context); Assert.AreSame(hydraulicBoundaryLocationCalculation, context.WrappedData); }
public void CreateInstance_WithContext_SetsDataCorrectly() { // Setup var hydraulicBoundaryLocationCalculation = new HydraulicBoundaryLocationCalculation(new TestHydraulicBoundaryLocation()); var context = new WaveHeightCalculationContext(hydraulicBoundaryLocationCalculation); using (var plugin = new RiskeerPlugin()) { PropertyInfo info = GetInfo(plugin); // Call IObjectProperties objectProperties = info.CreateInstance(context); // Assert Assert.IsInstanceOf <WaveHeightCalculationProperties>(objectProperties); Assert.AreSame(hydraulicBoundaryLocationCalculation, objectProperties.Data); } }