Пример #1
0
        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));
        }
Пример #2
0
        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));
        }