public void Constructor_ValidData_PropertiesHaveExpectedAttributeValues() { // Setup var input = new MacroStabilityInwardsInput(new MacroStabilityInwardsInput.ConstructionProperties()); // Call var properties = new MacroStabilityInwardsWaterStressLinesProperties(input, new GeneralMacroStabilityInwardsInput(), AssessmentSectionTestHelper.GetTestAssessmentLevel()); // Assert PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); Assert.AreEqual(2, dynamicProperties.Count); const string waterStressesCategoryName = "Waterspanningen"; PropertyDescriptor waternetExtremeProperty = dynamicProperties[0]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(waternetExtremeProperty, waterStressesCategoryName, "Extreme omstandigheden", "Eigenschappen van de waterspanningslijnen bij extreme omstandigheden.", true); PropertyDescriptor waternetDailyProperty = dynamicProperties[1]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(waternetDailyProperty, waterStressesCategoryName, "Dagelijkse omstandigheden", "Eigenschappen van de waterspanningslijnen bij dagelijkse omstandigheden.", true); }
public void Constructor_Always_PropertiesHaveExpectedAttributesValues() { // Setup var mocks = new MockRepository(); var failureMechanism = mocks.Stub <IFailureMechanism>(); mocks.ReplayAll(); // Call using (var properties = new FailureMechanismSectionsProperties(failureMechanism)) { // Assert PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); Assert.AreEqual(2, dynamicProperties.Count); const string generalCategoryName = "Algemeen"; PropertyDescriptor sourcePathProperty = dynamicProperties[0]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(sourcePathProperty, generalCategoryName, "Bronlocatie", "De locatie van het bestand waaruit de vakindeling is geïmporteerd.", true); PropertyDescriptor sectionsProperty = dynamicProperties[1]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(sectionsProperty, generalCategoryName, "Vakindeling", "Vakindeling waarmee de waterkering voor dit faalmechanisme is " + "geschematiseerd ten behoeve van de beoordeling.", true); mocks.VerifyAll(); } }
public void Constructor_ReferenceLineWithGeometry_PropertiesHaveExpectedAttributeValues() { // Call var properties = new ReferenceLineProperties(ReferenceLineTestFactory.CreateReferenceLineWithGeometry()); // Assert PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); Assert.AreEqual(2, dynamicProperties.Count); const string generalCategoryName = "Algemeen"; PropertyDescriptor lengthProperty = dynamicProperties[0]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(lengthProperty, generalCategoryName, "Lengte* [m]", "Totale lengte van het traject in meters (afgerond).", true); PropertyDescriptor geometryProperty = dynamicProperties[1]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(geometryProperty, generalCategoryName, "Coördinaten", "Lijst van alle coördinaten (X-coördinaat, Y-coördinaat) " + "die samen de referentielijn vormen.", true); }
private static void AssertPropertiesInState(NormalDistributionProperties properties, bool meanReadOnly, bool deviationReadOnly) { PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); Assert.AreEqual(3, dynamicProperties.Count); PropertyDescriptor distributionTypeProperty = dynamicProperties[0]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(distributionTypeProperty, "Misc", "Type verdeling", "Het soort kansverdeling waarin deze parameter gedefinieerd wordt.", true); PropertyDescriptor meanProperty = dynamicProperties[1]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(meanProperty, "Misc", "Verwachtingswaarde", "De gemiddelde waarde van de normale verdeling.", meanReadOnly); PropertyDescriptor standardDeviationProperty = dynamicProperties[2]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(standardDeviationProperty, "Misc", "Standaardafwijking", "De standaardafwijking van de normale verdeling.", deviationReadOnly); }
public void Constructor_Always_PropertiesHaveExpectedAttributeValues() { // Call var properties = new TestWaveImpactAsphaltCoverFailureMechanismProperties( new WaveImpactAsphaltCoverFailureMechanism(), new WaveImpactAsphaltCoverFailureMechanismPropertiesBase.ConstructionProperties { NamePropertyIndex = namePropertyIndex, CodePropertyIndex = codePropertyIndex }); // Assert PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); Assert.AreEqual(2, dynamicProperties.Count); const string generalCategory = "Algemeen"; PropertyDescriptor nameProperty = dynamicProperties[namePropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(nameProperty, generalCategory, "Naam", "De naam van het faalmechanisme.", true); PropertyDescriptor codeProperty = dynamicProperties[codePropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(codeProperty, generalCategory, "Label", "Het label van het faalmechanisme.", true); }
public void Constructor_WithData_PropertiesHaveExpectedAttributesValues() { // Setup PartialProbabilisticPipingOutput <TestTopLevelIllustrationPoint> output = PipingTestDataGenerator.GetRandomPartialProbabilisticPipingOutput(null); // Call var properties = new TestProbabilisticPipingOutputProperties(output); // Assert PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); Assert.AreEqual(2, dynamicProperties.Count); PropertyDescriptor probabilityProperty = dynamicProperties[probabilityPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(probabilityProperty, resultCategoryName, "Faalkans [1/jaar]", "De kans dat het faalmechanisme optreedt voor deze berekening.", true); PropertyDescriptor reliabilityProperty = dynamicProperties[reliabilityPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(reliabilityProperty, resultCategoryName, "Betrouwbaarheidsindex faalkans [-]", "De betrouwbaarheidsindex van de faalkans voor deze berekening.", true); }
public void Constructor_Always_PropertiesHaveExpectedAttributesValues() { // Call var properties = new WaterLevelCalculationsForNormTargetProbabilityProperties(new ObservableList <HydraulicBoundaryLocationCalculation>(), 0.1); // Assert PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); Assert.AreEqual(2, dynamicProperties.Count); PropertyDescriptor targetProbabilityProperty = dynamicProperties[targetProbabilityPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(targetProbabilityProperty, "Algemeen", "Doelkans [1/jaar]", "Overschrijdingskans waarvoor de hydraulische belastingen worden berekend.", true); PropertyDescriptor locationsProperty = dynamicProperties[calculationsPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(locationsProperty, "Algemeen", "Locaties", "Locaties uit de hydraulische belastingendatabase.", true); }
public void Constructor_WithNonWmtsMapDataConfiguration_PropertiesHaveExpectedAttributesValues() { // Setup var backgroundData = new BackgroundData(new TestBackgroundDataConfiguration()); // Call var properties = new BackgroundDataProperties(backgroundData); // Assert PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); Assert.AreEqual(3, dynamicProperties.Count); PropertyDescriptor nameProperty = dynamicProperties[requiredNamePropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(nameProperty, "Algemeen", "Omschrijving", "Omschrijving van de achtergrond kaartlaag.", true); PropertyDescriptor transparencyPropertyIndex = dynamicProperties[requiredTransparencyPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(transparencyPropertyIndex, "Algemeen", "Transparantie", "Transparantie waarmee de achtergrond kaartlaag wordt weergegeven."); PropertyDescriptor visibilityProperty = dynamicProperties[requiredVisibilityPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(visibilityProperty, "Algemeen", "Weergeven", "Geeft aan of de geselecteerde achtergrond kaartlaag in alle kaarten van dit traject wordt weergegeven."); }
public void Constructor_Always_PropertiesHaveExpectedAttributesValues() { // Setup var mocks = new MockRepository(); var assessmentSection = mocks.Stub <IAssessmentSection>(); var handler = mocks.Stub <IObservablePropertyChangeHandler>(); mocks.ReplayAll(); var calculation = new GrassCoverErosionOutwardsWaveConditionsCalculation(); var context = new GrassCoverErosionOutwardsWaveConditionsInputContext( calculation.InputParameters, calculation, assessmentSection, Enumerable.Empty <ForeshoreProfile>()); // Call var properties = new GrassCoverErosionOutwardsWaveConditionsInputContextProperties( context, AssessmentSectionTestHelper.GetTestAssessmentLevel, handler); // Assert PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); Assert.AreEqual(16, dynamicProperties.Count); PropertyDescriptor revetmentTypeProperty = dynamicProperties[10]; Assert.IsInstanceOf <EnumTypeConverter>(revetmentTypeProperty.Converter); PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(revetmentTypeProperty, "Modelinstellingen", "Type bekleding", "Het type van de bekleding waarvoor berekend wordt."); mocks.VerifyAll(); }
public void Constructor_ValidData_PropertiesHaveExpectedAttributeValues() { // Setup var mocks = new MockRepository(); var assessmentSection = mocks.Stub <IAssessmentSection>(); mocks.ReplayAll(); // Call var properties = new AssessmentSectionProperties(assessmentSection); // Assert PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); Assert.AreEqual(2, dynamicProperties.Count); const string generalCategoryName = "Algemeen"; PropertyDescriptor idProperty = dynamicProperties[0]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(idProperty, generalCategoryName, "ID", "ID van het traject.", true); PropertyDescriptor nameProperty = dynamicProperties[1]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(nameProperty, generalCategoryName, "Naam", "Naam van het traject."); mocks.VerifyAll(); }
public void Constructor_WithValidData_PropertiesHaveExpectedAttributesValues() { // Setup var hydraulicBoundaryLocationCalculation = new HydraulicBoundaryLocationCalculation(new TestHydraulicBoundaryLocation()); // Call var properties = new DesignWaterLevelCalculationProperties(hydraulicBoundaryLocationCalculation); // Assert PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); Assert.AreEqual(10, dynamicProperties.Count); const string resultCategory = "Resultaat"; PropertyDescriptor designWaterLevelProperty = dynamicProperties[designWaterLevelPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(designWaterLevelProperty, resultCategory, "Waterstand [m+NAP]", "Berekende waterstand.", true); PropertyDescriptor convergenceProperty = dynamicProperties[convergencePropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(convergenceProperty, resultCategory, "Convergentie", "Is convergentie bereikt in de waterstand berekening?", true); }
public void Constructor_MapLineDataWithMapTheme_PropertiesHaveExpectedAttributesValues() { // Setup var mapLineData = new MapLineData("Test", new LineStyle(), CreateMapTheme()) { ShowLabels = true }; // Call var properties = new MapLineDataProperties(mapLineData, Enumerable.Empty <MapDataCollection>()); // Assert PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); Assert.AreEqual(7, dynamicProperties.Count); const string styleCategory = "Stijl"; PropertyDescriptor categoryThemesProperty = dynamicProperties[categoryThemesPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(categoryThemesProperty, styleCategory, "Categorieën", string.Empty, true); }
public void Constructor_ValidData_PropertiesHaveExpectedAttributeValues() { // Setup MacroStabilityInwardsPhreaticLine phreaticLine = MacroStabilityInwardsTestDataFactory.CreateMacroStabilityInwardsPhreaticLine(); // Call var properties = new MacroStabilityInwardsPhreaticLineProperties(phreaticLine); // Assert PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); Assert.AreEqual(2, dynamicProperties.Count); const string waterStressesCategoryName = "Waterspanningen"; PropertyDescriptor nameProperty = dynamicProperties[0]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(nameProperty, waterStressesCategoryName, "Naam", "De naam van de lijn.", true); PropertyDescriptor geometryProperty = dynamicProperties[1]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(geometryProperty, waterStressesCategoryName, "Geometrie", "De geometrie van de lijn.", true); }
public void Constructor_Always_PropertiesHaveExpectedAttributesValues() { // Setup var mockRepository = new MockRepository(); var handler = mockRepository.Stub <IObservablePropertyChangeHandler>(); mockRepository.ReplayAll(); var distribution = new LogNormalDistribution(); var designVariable = new LogNormalDistributionDesignVariable(distribution); // Call var properties = new ShiftedLogNormalDistributionDesignVariableProperties(DistributionReadOnlyProperties.None, designVariable, handler); // Assert PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); Assert.AreEqual(5, dynamicProperties.Count); PropertyDescriptor distributionTypeProperty = dynamicProperties[0]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(distributionTypeProperty, "Misc", "Type verdeling", "Het soort kansverdeling waarin deze parameter gedefinieerd wordt.", true); PropertyDescriptor meanProperty = dynamicProperties[1]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(meanProperty, "Misc", "Verwachtingswaarde", "De gemiddelde waarde van de lognormale verdeling."); PropertyDescriptor standardDeviationProperty = dynamicProperties[2]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(standardDeviationProperty, "Misc", "Standaardafwijking", "De standaardafwijking van de lognormale verdeling."); PropertyDescriptor shiftProperty = dynamicProperties[3]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(shiftProperty, "Misc", "Verschuiving", "De hoeveelheid waarmee de kansverdeling naar rechts (richting van positieve X-as) verschoven is.", true); PropertyDescriptor designValueProperty = dynamicProperties[4]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(designValueProperty, "Misc", "Rekenwaarde", "De representatieve waarde die gebruikt wordt door de berekening.", true); mockRepository.VerifyAll(); }
public void Constructor_ValidData_PropertiesHaveExpectedAttributeValues() { // Setup MacroStabilityInwardsSoilLayer2D layer = MacroStabilityInwardsSoilLayer2DTestFactory.CreateMacroStabilityInwardsSoilLayer2D(); // Call var properties = new MacroStabilityInwardsSoilLayer2DBaseProperties(layer); // Assert PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); Assert.AreEqual(2, dynamicProperties.Count); const string generalCategoryName = "Algemeen"; PropertyDescriptor nameProperty = dynamicProperties[0]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(nameProperty, generalCategoryName, "Naam", "De naam van de grondlaag.", true); PropertyDescriptor outerRingProperty = dynamicProperties[1]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(outerRingProperty, generalCategoryName, "Geometrie", "De geometrie van de buitenring van deze grondlaag.", true); }
public void Constructor_Always_PropertiesHaveExpectedAttributesValues() { // Setup var chartDataCollection = new ChartDataCollection("Test"); // Call var properties = new ChartDataCollectionProperties { Data = chartDataCollection }; // Assert PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); Assert.AreEqual(1, dynamicProperties.Count); const string generalCategory = "Algemeen"; PropertyDescriptor nameProperty = dynamicProperties[namePropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(nameProperty, generalCategory, "Naam", "De naam van deze gegevensreeks.", true); }
public void Constructor_ValidData_PropertiesHaveExpectedAttributeValues() { // Setup var waternet = new MacroStabilityInwardsWaternet(Enumerable.Empty <MacroStabilityInwardsPhreaticLine>(), Enumerable.Empty <MacroStabilityInwardsWaternetLine>()); // Call var properties = new MacroStabilityInwardsWaternetProperties(waternet); // Assert PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); Assert.AreEqual(2, dynamicProperties.Count); const string waterStressesCategoryName = "Waterspanningen"; PropertyDescriptor phreaticLinesProperty = dynamicProperties[0]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(phreaticLinesProperty, waterStressesCategoryName, "Stijghoogtelijnen", "Eigenschappen van de stijghoogtelijnen.", true); PropertyDescriptor waternetLinesProperty = dynamicProperties[1]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(waternetLinesProperty, waterStressesCategoryName, "Zones", "Eigenschappen van de zones.", true); }
public void Constructor_WithPreconsolidationStress_PropertiesHaveExpectedAttributeValues() { // Call var properties = new MacroStabilityInwardsPreconsolidationStressProperties( MacroStabilityInwardsPreconsolidationStressTestFactory.CreateMacroStabilityInwardsPreconsolidationStress()); // Assert PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); Assert.AreEqual(3, dynamicProperties.Count); const string generalCategory = "Algemeen"; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties( dynamicProperties[0], generalCategory, "X [m]", "Lokale x-coördinaat van het punt waarvoor de grensspanning is opgegeven.", true); PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties( dynamicProperties[1], generalCategory, "Z [m+NAP]", "Lokale z-coördinaat van het punt waarvoor de grensspanning is opgegeven.", true); PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties( dynamicProperties[2], generalCategory, "Grensspanning [kN/m²]", "Grensspanning op de aangegeven locatie.", true); }
private static void AssertPropertiesInState(SimpleDistributionProperties properties, bool meanReadOnly, bool variationCoefficientReadOnly) { Assert.IsInstanceOf <VariationCoefficientDistributionPropertiesBase <IVariationCoefficientDistribution> >(properties); PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); Assert.AreEqual(3, dynamicProperties.Count); PropertyDescriptor distributionTypeProperty = dynamicProperties[0]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(distributionTypeProperty, "Misc", "Type verdeling", "Het soort kansverdeling waarin deze parameter gedefinieerd wordt.", true); PropertyDescriptor meanProperty = dynamicProperties[1]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(meanProperty, "Misc", "Verwachtingswaarde", "", meanReadOnly); PropertyDescriptor coefficientOfVariationProperty = dynamicProperties[2]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(coefficientOfVariationProperty, "Misc", "Variatiecoëfficiënt", "", variationCoefficientReadOnly); }
public void SelectedMetaDataAttribute_ShowLabelsTrue_SelectedMetaDataAttributeShouldBeVisible(bool showLabels) { // Setup var feature = new MapFeature(Enumerable.Empty <MapGeometry>()); feature.MetaData["key"] = "value"; var mapData = new TestFeatureBasedMapData { Features = new[] { feature }, ShowLabels = showLabels }; // Call var properties = new TestFeatureBasedMapDataProperties(mapData, Enumerable.Empty <MapDataCollection>()); // Assert PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); Assert.AreEqual(showLabels ? 6 : 5, dynamicProperties.Count); if (showLabels) { PropertyDescriptor selectedMetaDataAttributeProperty = dynamicProperties[selectedMetaDataAttributePropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(selectedMetaDataAttributeProperty, "Labels", "Op basis van", "Toont de eigenschap op basis waarvan labels worden weergegeven op deze kaartlaag."); } }
public void Constructor_Always_PropertiesHaveExpectedAttributesValues() { // Setup var mocks = new MockRepository(); var targetProbabilityChangeHandler = mocks.Stub <IObservablePropertyChangeHandler>(); mocks.ReplayAll(); // Call using (var properties = new DuneLocationCalculationsForUserDefinedTargetProbabilityProperties( new DuneLocationCalculationsForTargetProbability(0.1), targetProbabilityChangeHandler)) { // Assert PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); Assert.AreEqual(2, dynamicProperties.Count); PropertyDescriptor targetProbabilityProperty = dynamicProperties[targetProbabilityPropertyIndex]; Assert.IsInstanceOf <NoProbabilityValueDoubleConverter>(targetProbabilityProperty.Converter); PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(targetProbabilityProperty, "Algemeen", "Doelkans [1/jaar]", "Overschrijdingskans waarvoor de hydraulische belastingen worden berekend."); PropertyDescriptor locationsProperty = dynamicProperties[calculationsPropertyIndex]; Assert.IsInstanceOf <ExpandableArrayConverter>(locationsProperty.Converter); PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(locationsProperty, "Algemeen", "Locaties", "Locaties uit de hydraulische belastingendatabase.", true); mocks.VerifyAll(); } }
public void Constructor_CalculationTypeWaveRunUpOrWaveImpact_PropertiesHaveExpectedAttributesValues( GrassCoverErosionOutwardsWaveConditionsCalculationType calculationType, string expectedDisplayName, string expectedDescription) { // Setup GrassCoverErosionOutwardsWaveConditionsOutput output = GrassCoverErosionOutwardsWaveConditionsOutputTestFactory.Create(); var input = new GrassCoverErosionOutwardsWaveConditionsInput { CalculationType = calculationType }; // Call var properties = new GrassCoverErosionOutwardsWaveConditionsOutputProperties(output, input); // Assert PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); Assert.AreEqual(1, dynamicProperties.Count); PropertyDescriptor outputProperty = dynamicProperties[0]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(outputProperty, "Resultaat", expectedDisplayName, expectedDescription, true); }
public void Constructor_NoGeneralResult_PropertiesHaveExpectedAttributesValues() { // Setup var structuresOutput = new StructuresOutput(0, null); // Call var properties = new StructuresOutputProperties(structuresOutput); // Assert PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); Assert.AreEqual(2, dynamicProperties.Count); PropertyDescriptor probabilityProperty = dynamicProperties[probabilityPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(probabilityProperty, resultCategoryName, "Faalkans [1/jaar]", "De kans dat het faalmechanisme optreedt voor deze berekening.", true); PropertyDescriptor reliabilityProperty = dynamicProperties[reliabilityPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(reliabilityProperty, resultCategoryName, "Betrouwbaarheidsindex faalkans [-]", "De betrouwbaarheidsindex van de faalkans voor deze berekening.", true); }
public void Constructor_Always_PropertiesHaveExpectedAttributeValues() { // Setup var failureMechanism = new DuneErosionFailureMechanism(); // Call var properties = new DuneErosionFailureMechanismProperties(failureMechanism); // Assert PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); Assert.AreEqual(2, dynamicProperties.Count); const string generalCategory = "Algemeen"; PropertyDescriptor nameProperty = dynamicProperties[namePropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(nameProperty, generalCategory, "Naam", "De naam van het faalmechanisme.", true); PropertyDescriptor codeProperty = dynamicProperties[codePropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(codeProperty, generalCategory, "Label", "Het label van het faalmechanisme.", true); }
public void Constructor_Always_PropertiesHaveExpectedAttributesValues() { // Setup DikeProfile dikeProfile = DikeProfileTestFactory.CreateDikeProfile(); // Call var properties = new DikeProfileDikeGeometryProperties { Data = dikeProfile }; // Assert PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); Assert.AreEqual(2, dynamicProperties.Count); PropertyDescriptor coordinatesProperty = dynamicProperties[coordinatesPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(coordinatesProperty, "Misc", "Coördinaten [m]", "Lijst met punten in lokale coördinaten.", true); PropertyDescriptor roughnessesProperty = dynamicProperties[roughnessesPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(roughnessesProperty, "Misc", "Ruwheid invloedsfactoren [-]", "Lijst met invloedsfactoren voor ruwheid op het talud van elk onderdeel.", true); }
public void Constructor_ValidData_PropertiesHaveExpectedAttributeValues() { // Setup var mocks = new MockRepository(); var failureMechanism = mocks.StrictMock <ICalculatableFailureMechanism>(); mocks.ReplayAll(); // Call var properties = new CalculationGroupContextProperties(new TestCalculationGroupContext(new CalculationGroup(), new CalculationGroup(), failureMechanism)); // Assert PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); Assert.AreEqual(1, dynamicProperties.Count); PropertyDescriptor nameProperty = dynamicProperties[0]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(nameProperty, "Algemeen", "Naam", "Naam van de map met berekeningen."); }
public void Constructor_Always_PropertiesHaveExpectedAttributesValues() { // Setup var mapDataCollection = new MapDataCollection("Test"); // Call var properties = new MapDataCollectionProperties(mapDataCollection); // Assert PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); Assert.AreEqual(2, dynamicProperties.Count); const string mapDataCollectionCategory = "Kaartlagenmap"; PropertyDescriptor nameProperty = dynamicProperties[namePropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(nameProperty, mapDataCollectionCategory, "Naam", "De naam van deze kaartlagenmap.", true); PropertyDescriptor visibilityProperty = dynamicProperties[visibilityPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(visibilityProperty, mapDataCollectionCategory, "Weergeven", "Geeft aan of deze kaartlagenmap wordt weergegeven.", true); }
public void Constructor_InAssemblyTrue_PropertiesHaveExpectedAttributesValues() { // Setup var failureMechanism = new PipingStructureFailureMechanism { InAssembly = true }; // Call var properties = new PipingStructureFailureMechanismProperties(failureMechanism); // Assert PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); Assert.AreEqual(5, dynamicProperties.Count); const string generalCategory = "Algemeen"; const string lengthEffectCategory = "Lengte-effect"; PropertyDescriptor nameProperty = dynamicProperties[namePropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(nameProperty, generalCategory, "Naam", "De naam van het faalmechanisme.", true); PropertyDescriptor labelProperty = dynamicProperties[codePropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(labelProperty, generalCategory, "Label", "Het label van het faalmechanisme.", true); PropertyDescriptor inAssemblyProperty = dynamicProperties[inAssemblyPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(inAssemblyProperty, generalCategory, "In assemblage", "Geeft aan of dit faalmechanisme wordt meegenomen in de assemblage.", true); PropertyDescriptor nProperty = dynamicProperties[nPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(nProperty, lengthEffectCategory, "N [-]", "De parameter 'N' die gebruikt wordt om het lengte-effect mee te nemen in de beoordeling."); PropertyDescriptor applySectionLengthInSectionProperty = dynamicProperties[applyLengthEffectInSectionPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(applySectionLengthInSectionProperty, lengthEffectCategory, "Toepassen lengte-effect binnen vak", "Geeft aan of het lengte-effect binnen een vak toegepast wordt.", true); }
public void Constructor_Always_PropertiesHaveExpectedAttributesValues() { // Setup var pipingStochasticSoilProfile = new PipingStochasticSoilProfile(0.0, new PipingSoilProfile("", 0.0, new[] { new PipingSoilLayer(10.0) }, SoilProfileType.SoilProfile1D)); // Call var properties = new PipingStochasticSoilProfileProperties(pipingStochasticSoilProfile); // Assert const string generalCategoryName = "Algemeen"; PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); Assert.AreEqual(5, dynamicProperties.Count); PropertyDescriptor nameProperty = dynamicProperties[0]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(nameProperty, generalCategoryName, "Naam", "De naam van de ondergrondschematisatie.", true); PropertyDescriptor contributionProperty = dynamicProperties[1]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(contributionProperty, generalCategoryName, "Aandeel [%]", "Het aandeel van de ondergrondschematisatie in het stochastische ondergrondmodel.", true); PropertyDescriptor layersProperty = dynamicProperties[2]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(layersProperty, generalCategoryName, "Grondlagen", "", true); PropertyDescriptor bottomProperty = dynamicProperties[3]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(bottomProperty, generalCategoryName, "Bodemniveau", "Het niveau van de onderkant van de ondergrondschematisatie.", true); PropertyDescriptor typeProperty = dynamicProperties[4]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(typeProperty, generalCategoryName, "Type", "Het type van de ondergrondschematisatie.", true); }
public void VisibleProperties_WithSoilProfile1D_ExpectedAttributesValues() { // Setup var layer = new MacroStabilityInwardsSoilLayer1D(-2); var stochasticSoilProfile = new MacroStabilityInwardsStochasticSoilProfile(0.142, new MacroStabilityInwardsSoilProfile1D("<some name>", -5.0, new[] { layer })); // Call var properties = new MacroStabilityInwardsStochasticSoilProfileProperties(stochasticSoilProfile); // Assert PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); Assert.AreEqual(5, dynamicProperties.Count); PropertyDescriptor nameProperty = dynamicProperties[0]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(nameProperty, generalCategoryName, "Naam", "De naam van de ondergrondschematisatie.", true); PropertyDescriptor contributionProperty = dynamicProperties[1]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(contributionProperty, generalCategoryName, "Aandeel [%]", "Het aandeel van de ondergrondschematisatie in het stochastische ondergrondmodel.", true); PropertyDescriptor layersProperty = dynamicProperties[2]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(layersProperty, generalCategoryName, "Grondlagen", "", true); PropertyDescriptor bottomProperty = dynamicProperties[3]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(bottomProperty, generalCategoryName, "Bodemniveau", "Het niveau van de onderkant van de ondergrondschematisatie.", true); PropertyDescriptor typeProperty = dynamicProperties[4]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(typeProperty, generalCategoryName, "Type", "Het type van de ondergrondschematisatie.", true); }