public void GetProperties_WithData_ReturnExpectedValues() { // Setup var hydraulicBoundaryLocationCalculation = new HydraulicBoundaryLocationCalculation(new TestHydraulicBoundaryLocation()); // Call var properties = new TestWaveHeightCalculationsProperties(new ObservableList <HydraulicBoundaryLocationCalculation> { hydraulicBoundaryLocationCalculation }); // Assert Assert.AreEqual(1, properties.Calculations.Length); Assert.AreSame(hydraulicBoundaryLocationCalculation, properties.Calculations[0].Data); }
public void Constructor_WithHydraulicBoundaryLocationCalculations_ExpectedValues() { // Setup var hydraulicBoundaryLocationCalculations = new ObservableList <HydraulicBoundaryLocationCalculation>(); // Call var properties = new TestWaveHeightCalculationsProperties(hydraulicBoundaryLocationCalculations); // Assert Assert.IsInstanceOf <HydraulicBoundaryLocationCalculationsProperties>(properties); Assert.AreSame(hydraulicBoundaryLocationCalculations, properties.Data); TestHelper.AssertTypeConverter <WaveHeightCalculationsProperties, ExpandableArrayConverter>( nameof(WaveHeightCalculationsProperties.Calculations)); }
public void Constructor_Always_PropertiesHaveExpectedAttributesValues() { // Call var properties = new TestWaveHeightCalculationsProperties(new ObservableList <HydraulicBoundaryLocationCalculation>()); // Assert PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); Assert.AreEqual(1, dynamicProperties.Count); PropertyDescriptor locationsProperty = dynamicProperties[requiredLocationsPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(locationsProperty, "Algemeen", "Locaties", "Locaties uit de hydraulische belastingendatabase.", true); }