public void GetProperties_WithData_ReturnExpectedValues() { // Setup var hydraulicBoundaryLocationCalculation = new HydraulicBoundaryLocationCalculation(new TestHydraulicBoundaryLocation()); // Call var properties = new TestDesignWaterLevelCalculationsProperties(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 TestDesignWaterLevelCalculationsProperties(hydraulicBoundaryLocationCalculations); // Assert Assert.IsInstanceOf <HydraulicBoundaryLocationCalculationsProperties>(properties); Assert.AreSame(hydraulicBoundaryLocationCalculations, properties.Data); TestHelper.AssertTypeConverter <DesignWaterLevelCalculationsProperties, ExpandableArrayConverter>( nameof(DesignWaterLevelCalculationsProperties.Calculations)); }
public void Constructor_Always_PropertiesHaveExpectedAttributesValues() { // Call var properties = new TestDesignWaterLevelCalculationsProperties(new ObservableList <HydraulicBoundaryLocationCalculation>()); // Assert PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); Assert.AreEqual(1, dynamicProperties.Count); PropertyDescriptor locationsProperty = dynamicProperties[locationsPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(locationsProperty, "Algemeen", "Locaties", "Locaties uit de hydraulische belastingendatabase.", true); }