public void Constructor_WithData_ReturnExpectedValues() { // Setup const string someFilePath = "location/to/a/file"; var collection = new MacroStabilityInwardsStochasticSoilModelCollection(); collection.AddRange(Enumerable.Empty <MacroStabilityInwardsStochasticSoilModel>(), someFilePath); // Call var properties = new MacroStabilityInwardsStochasticSoilModelCollectionProperties(collection); // Assert Assert.IsInstanceOf <ObjectProperties <MacroStabilityInwardsStochasticSoilModelCollection> >(properties); Assert.AreSame(collection, properties.Data); Assert.AreEqual(someFilePath, properties.SourcePath); }
public void Constructor_WithData_PropertiesHaveExpectedAttributesValues() { // Setup var collection = new MacroStabilityInwardsStochasticSoilModelCollection(); // Call var properties = new MacroStabilityInwardsStochasticSoilModelCollectionProperties(collection); // Assert PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); Assert.AreEqual(1, dynamicProperties.Count); PropertyDescriptor stochasticSoilModelSourcePathProperty = dynamicProperties[0]; Assert.IsNotNull(stochasticSoilModelSourcePathProperty); Assert.IsTrue(stochasticSoilModelSourcePathProperty.IsReadOnly); Assert.AreEqual("Algemeen", stochasticSoilModelSourcePathProperty.Category); Assert.AreEqual("Bronlocatie", stochasticSoilModelSourcePathProperty.DisplayName); Assert.AreEqual( "De locatie van het bestand waaruit de stochastische ondergrondmodellen zijn geïmporteerd.", stochasticSoilModelSourcePathProperty.Description); }