public void DynamicVisibleValidationMethod_ShowLabels_ReturnsExpectedValuesForRelevantProperties(bool showLabels) { // Setup var mapData = new TestFeatureBasedMapData { ShowLabels = showLabels }; var properties = new TestFeatureBasedMapDataProperties(mapData, Enumerable.Empty <MapDataCollection>()); // Call bool isSelectedMetaDataAttributeVisible = properties.DynamicVisibleValidationMethod( nameof(TestFeatureBasedMapDataProperties.SelectedMetaDataAttribute)); // Assert Assert.AreEqual(showLabels, isSelectedMetaDataAttributeVisible); }
public void DynamicVisibleValidationMethod_AnyOtherProperty_ReturnsTrue() { var mapData = new TestFeatureBasedMapData { Features = new[] { new MapFeature(Enumerable.Empty <MapGeometry>()) }, ShowLabels = true }; var properties = new TestFeatureBasedMapDataProperties(mapData, Enumerable.Empty <MapDataCollection>()); // Call bool isOtherPropertyVisible = properties.DynamicVisibleValidationMethod(string.Empty); // Assert Assert.IsFalse(isOtherPropertyVisible); }