private bool IsInternalProperty(NUnitProperty property) { if (property.Name == ExplicitTraitName) { // Otherwise the IsNullOrEmpty check does the wrong thing, // but I'm not sure of the consequences of allowing all empty strings. return(false); } // Property names starting with '_' are for internal use only, but over time this has changed, so we now use a list if (!settings.ShowInternalProperties && _internalProperties.Contains(property.Name, StringComparer.OrdinalIgnoreCase)) { return(true); } return(string.IsNullOrEmpty(property.Name) || property.Name[0] == '_' || string.IsNullOrEmpty(property.Value)); }
private void AddTraitsToCache(IDictionary <string, TraitsFeature.CachedTestCaseInfo> traitsCache, string key, NUnitProperty property) { if (IsInternalProperty(property)) { return; } var info = GetCachedInfo(traitsCache, key); info.Traits.Add(new Trait(property.Name, property.Value)); }