1 instantiation of TestProperty
Microsoft.VisualStudio.TestPlatform.ObjectModel (1)
TestProperty\TestProperty.cs (1)
347result = new TestProperty(id, label, category, description, valueType, validateValueCallback, attributes);
148 references to TestProperty
Microsoft.TestPlatform.CommunicationUtilities (31)
Serialization\TestCaseConverter.cs (4)
42var testProperty = JsonSerializer.Deserialize<TestProperty>(keyElement.GetRawText(), options); 91testProperty = TestProperty.Register(testProperty.Id, testProperty.Label, testProperty.GetValueType(), testProperty.Attributes, typeof(TestObject)); 163private static void WriteProperty(Utf8JsonWriter writer, TestProperty property, JsonSerializerOptions options)
Serialization\TestCaseConverterV2.cs (3)
52var testProperty = JsonSerializer.Deserialize<TestProperty>(keyElement, options); 67testProperty = TestProperty.Register(testProperty.Id, testProperty.Label, testProperty.GetValueType(), testProperty.Attributes, typeof(TestObject));
Serialization\TestObjectBaseConverter.cs (2)
56var testProperty = JsonSerializer.Deserialize<TestProperty>(keyElement.GetRawText(), options);
Serialization\TestObjectConverter.cs (7)
18internal class TestObjectConverter : JsonConverter<List<KeyValuePair<TestProperty, object>>> 21public override List<KeyValuePair<TestProperty, object>>? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 23var propertyList = new List<KeyValuePair<TestProperty, object>>(); 44var testProperty = JsonSerializer.Deserialize<TestProperty>(keyElement, options); 64propertyList.Add(new KeyValuePair<TestProperty, object>(testProperty, propertyData!)); 71public override void Write(Utf8JsonWriter writer, List<KeyValuePair<TestProperty, object>> value, JsonSerializerOptions options)
Serialization\TestPropertyConverter.cs (8)
15/// JSON converter for <see cref="TestProperty"/> that serializes only the data-member properties 16/// and skips the <see cref="TestProperty.ValidateValueCallback"/> delegate which cannot be serialized. 18internal class TestPropertyConverter : JsonConverter<TestProperty> 21public override TestProperty? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 45var testProperty = TestProperty.Find(id); 59testProperty = TestProperty.Register(id, label, category ?? string.Empty, description ?? string.Empty, resolvedType, null, attributes, typeof(TestObject)); 71public override void Write(Utf8JsonWriter writer, TestProperty value, JsonSerializerOptions options)
Serialization\TestResultConverter.cs (4)
63var testProperty = JsonSerializer.Deserialize<TestProperty>(property.GetProperty("Key"), options)!; 103testProperty = TestProperty.Register(testProperty.Id, testProperty.Label, testProperty.GetValueType(), testProperty.Attributes, typeof(TestObject)); 188private static void WriteProperty(Utf8JsonWriter writer, TestProperty property, JsonSerializerOptions options)
Serialization\TestResultConverterV2.cs (3)
83var testProperty = JsonSerializer.Deserialize<TestProperty>(keyElement, options)!; 96testProperty = TestProperty.Register(testProperty.Id, testProperty.Label, testProperty.GetValueType(), testProperty.Attributes, typeof(TestObject));
Microsoft.TestPlatform.CrossPlatEngine (7)
DataCollection\InProcDataCollectionExtensionManager.cs (2)
302var testProperty = TestProperty.Register(id: keyValuePair.Key, label: keyValuePair.Key, category: string.Empty, description: string.Empty, valueType: typeof(string), validateValueCallback: null, attributes: TestPropertyAttributes.None, owner: typeof(TestCase));
Discovery\DiscoveryContext.cs (1)
34public ITestCaseFilterExpression? GetTestCaseFilter(IEnumerable<string>? supportedProperties, Func<string, TestProperty?> propertyProvider)
Execution\MSTestV1TelemetryHelper.cs (4)
14private static TestProperty? s_testTypeProperty; 15private static TestProperty? s_extensionIdProperty; 40s_testTypeProperty ??= TestProperty.Register("TestType", "TestType", typeof(Guid), typeof(TestResult)); 42s_extensionIdProperty ??= TestProperty.Register("ExtensionId", "ExtensionId", typeof(string), typeof(TestResult));
Microsoft.VisualStudio.TestPlatform.Common (6)
src\vstest\src\Microsoft.TestPlatform.Filter.Source\Condition.cs (3)
235internal bool ValidForProperties(IEnumerable<string> properties, Func<string, TestProperty?>? propertyProvider) 258private bool ValidForContainsOperation(Func<string, TestProperty?>? propertyProvider) 268TestProperty? testProperty = propertyProvider(Name);
src\vstest\src\Microsoft.TestPlatform.Filter.Source\FilterExpression.cs (1)
142internal string[]? ValidForProperties(IEnumerable<string>? properties, Func<string, TestProperty?>? propertyProvider)
src\vstest\src\Microsoft.TestPlatform.Filter.Source\FilterExpressionWrapper.cs (1)
136public string[]? ValidForProperties(IEnumerable<string>? supportedProperties, Func<string, TestProperty?>? propertyProvider)
src\vstest\src\Microsoft.TestPlatform.Filter.Source\TestCaseFilterExpression.cs (1)
61public string[]? ValidForProperties(IEnumerable<string>? supportedProperties, Func<string, TestProperty?> propertyProvider)
Microsoft.VisualStudio.TestPlatform.Extensions.Html.TestLogger (8)
Constants.cs (6)
62public static readonly TestProperty ExecutionIdProperty = TestProperty.Register("ExecutionId", ExecutionIdPropertyIdentifier, typeof(Guid), TestPropertyAttributes.Hidden, typeof(TestResult)); 64public static readonly TestProperty ParentExecIdProperty = TestProperty.Register("ParentExecId", ParentExecutionIdPropertyIdentifier, typeof(Guid), TestPropertyAttributes.Hidden, typeof(TestResult)); 66public static readonly TestProperty TestTypeProperty = TestProperty.Register("TestType", TestTypePropertyIdentifier, typeof(Guid), TestPropertyAttributes.Hidden, typeof(TestResult));
HtmlLogger.cs (2)
386var parentExecutionIdProperty = testResult.Properties.FirstOrDefault(property => 400var executionIdProperty = testResult.Properties.FirstOrDefault(property =>
Microsoft.VisualStudio.TestPlatform.Extensions.Trx.TestLogger (11)
Utility\Constants.cs (6)
107public static readonly TestProperty ExecutionIdProperty = TestProperty.Register("ExecutionId", ExecutionIdPropertyIdentifier, typeof(Guid), TestPropertyAttributes.Hidden, typeof(ObjectModel.TestResult)); 108public static readonly TestProperty ParentExecIdProperty = TestProperty.Register("ParentExecId", ParentExecutionIdPropertyIdentifier, typeof(Guid), TestPropertyAttributes.Hidden, typeof(ObjectModel.TestResult)); 109public static readonly TestProperty TestTypeProperty = TestProperty.Register("TestType", TestTypePropertyIdentifier, typeof(Guid), TestPropertyAttributes.Hidden, typeof(ObjectModel.TestResult));
Utility\Converter.cs (5)
276var customProperty = testCase.Properties.FirstOrDefault(t => t.Id.Equals(categoryId)); 298TestProperty? tmiTestIdProperty = rockSteadyTestCase.Properties.FirstOrDefault( 319TestProperty? parentExecutionIdProperty = testResult.Properties.FirstOrDefault( 334TestProperty? executionIdProperty = testResult.Properties.FirstOrDefault( 355TestProperty? testTypeProperty = testResult.Properties.FirstOrDefault(property => property.Id.Equals(Constants.TestTypePropertyIdentifier));
Microsoft.VisualStudio.TestPlatform.ObjectModel (79)
Adapter\Interfaces\IRunContext.cs (1)
39ITestCaseFilterExpression? GetTestCaseFilter(IEnumerable<string>? supportedProperties, Func<string, TestProperty?> propertyProvider);
TestCase.cs (23)
161public override IEnumerable<TestProperty> Properties 213private void SetPropertyAndResetId<T>(TestProperty property, T value) 223protected override object? ProtectedGetPropertyValue(TestProperty property, object? defaultValue) 243protected override void ProtectedSetPropertyValue(TestProperty property, object? value) 293private static readonly TestProperty ManagedTypeProperty = TestProperty.Register("TestCase.ManagedType", "ManagedType", string.Empty, string.Empty, typeof(string), o => !StringUtils.IsNullOrWhiteSpace(o as string), TestPropertyAttributes.Hidden, typeof(TestCase)); 294private static readonly TestProperty ManagedMethodProperty = TestProperty.Register("TestCase.ManagedMethod", "ManagedMethod", string.Empty, string.Empty, typeof(string), o => !StringUtils.IsNullOrWhiteSpace(o as string), TestPropertyAttributes.Hidden, typeof(TestCase)); 333public static readonly TestProperty Id = TestProperty.Register("TestCase.Id", IdLabel, string.Empty, string.Empty, typeof(Guid), ValidateGuid, TestPropertyAttributes.Hidden, typeof(TestCase)); 334public static readonly TestProperty FullyQualifiedName = TestProperty.Register("TestCase.FullyQualifiedName", FullyQualifiedNameLabel, string.Empty, string.Empty, typeof(string), ValidateName, TestPropertyAttributes.Hidden, typeof(TestCase)); 335public static readonly TestProperty DisplayName = TestProperty.Register("TestCase.DisplayName", NameLabel, string.Empty, string.Empty, typeof(string), ValidateDisplay, TestPropertyAttributes.None, typeof(TestCase)); 336public static readonly TestProperty ExecutorUri = TestProperty.Register("TestCase.ExecutorUri", ExecutorUriLabel, string.Empty, string.Empty, typeof(Uri), ValidateExecutorUri, TestPropertyAttributes.Hidden, typeof(TestCase)); 337public static readonly TestProperty Source = TestProperty.Register("TestCase.Source", SourceLabel, typeof(string), typeof(TestCase)); 338public static readonly TestProperty CodeFilePath = TestProperty.Register("TestCase.CodeFilePath", FilePathLabel, typeof(string), typeof(TestCase)); 339public static readonly TestProperty LineNumber = TestProperty.Register("TestCase.LineNumber", LineNumberLabel, typeof(int), TestPropertyAttributes.Hidden, typeof(TestCase)); 341internal static TestProperty[] Properties { get; } =
TestObject.cs (18)
29private readonly ConcurrentDictionary<TestProperty, object?> _store = new(); 37private List<KeyValuePair<TestProperty, object?>> StoreKeyValuePairs 47TestProperty.Register( 64public IEnumerable<KeyValuePair<TestProperty, object?>> GetProperties() 94public virtual IEnumerable<TestProperty> Properties 104public object? GetPropertyValue(TestProperty property) 126public T? GetPropertyValue<T>(TestProperty property, T? defaultValue) 137public void SetPropertyValue<T>(TestProperty property, T value) 148public void SetPropertyValue<T>(TestProperty property, LazyPropertyValue<T> value) 158public void SetPropertyValue(TestProperty property, object? value) 167public void RemovePropertyValue(TestProperty property) 178public T? GetPropertyValue<T>(TestProperty property, T? defaultValue, CultureInfo culture) 190public void SetPropertyValue<T>(TestProperty property, T value, CultureInfo culture) 202public void SetPropertyValue<T>(TestProperty property, LazyPropertyValue<T> value, CultureInfo culture) 216protected virtual object? ProtectedGetPropertyValue(TestProperty property, object? defaultValue) 230protected virtual void ProtectedSetPropertyValue(TestProperty property, object? value) 242private static object? ConvertPropertyFrom<T>(TestProperty property, CultureInfo culture, object? value) 295private static T? ConvertPropertyTo<T>(TestProperty property, CultureInfo culture, object? value)
TestProperty\TestProperty.cs (14)
18public class TestProperty : IEquatable<TestProperty> 29/// Initializes a new instance of the <see cref="TestProperty"/> class. 138return Equals(obj as TestProperty); 142public bool Equals(TestProperty? other) 255private static readonly Dictionary<string, KeyValuePair<TestProperty, HashSet<Type>>> Properties = new(); 270public static TestProperty? Find(string id) 274TestProperty? result = null; 287public static TestProperty Register(string id, string label, Type valueType, Type owner) 297public static TestProperty Register(string id, string label, Type valueType, TestPropertyAttributes attributes, Type owner) 307public static TestProperty Register(string id, string label, string category, string description, Type valueType, ValidateValueCallback? validateValueCallback, TestPropertyAttributes attributes, Type owner) 316TestProperty result; 350propertyTypePair = new KeyValuePair<TestProperty, HashSet<Type>>(result, new HashSet<Type>()); 361public static bool TryUnregister(string id, out KeyValuePair<TestProperty, HashSet<Type>> propertyTypePair) 378var registeredProperty = Find(Id);
TestResult.cs (20)
107public override IEnumerable<TestProperty> Properties 175protected override object? ProtectedGetPropertyValue(TestProperty property, object? defaultValue) 195protected override void ProtectedSetPropertyValue(TestProperty property, object? value) 289public static readonly TestProperty DisplayName = TestProperty.Register("TestResult.DisplayName", "TestResult Display Name", typeof(string), TestPropertyAttributes.Hidden, typeof(TestResult)); 290public static readonly TestProperty ComputerName = TestProperty.Register("TestResult.ComputerName", "Computer Name", typeof(string), TestPropertyAttributes.None, typeof(TestResult)); 291public static readonly TestProperty Outcome = TestProperty.Register("TestResult.Outcome", "Outcome", string.Empty, string.Empty, typeof(TestOutcome), ValidateOutcome, TestPropertyAttributes.None, typeof(TestResult)); 292public static readonly TestProperty Duration = TestProperty.Register("TestResult.Duration", "Duration", typeof(TimeSpan), typeof(TestResult)); 293public static readonly TestProperty StartTime = TestProperty.Register("TestResult.StartTime", "Start Time", typeof(DateTimeOffset), typeof(TestResult)); 294public static readonly TestProperty EndTime = TestProperty.Register("TestResult.EndTime", "End Time", typeof(DateTimeOffset), typeof(TestResult)); 295public static readonly TestProperty ErrorMessage = TestProperty.Register("TestResult.ErrorMessage", "Error Message", typeof(string), typeof(TestResult)); 296public static readonly TestProperty ErrorStackTrace = TestProperty.Register("TestResult.ErrorStackTrace", "Error Stack Trace", typeof(string), typeof(TestResult)); 322internal static TestProperty[] Properties { get; } =
TraitCollection.cs (3)
18private static readonly TestProperty TraitsProperty = TestProperty.Register( 68if (!_testObject.Properties.Contains(TraitsProperty, EqualityComparer<TestProperty>.Default))
vstest.console (3)
Internal\ConsoleLogger.cs (2)
382var parentExecutionIdProperty = testResult.Properties.FirstOrDefault(property => 396var executionIdProperty = testResult.Properties.FirstOrDefault(property =>
Processors\ListFullyQualifiedTestsArgumentProcessor.cs (1)
333foreach (var testProperty in testCase.Properties)
vstest.console.arm64 (3)
src\vstest\src\vstest.console\Internal\ConsoleLogger.cs (2)
382var parentExecutionIdProperty = testResult.Properties.FirstOrDefault(property => 396var executionIdProperty = testResult.Properties.FirstOrDefault(property =>
src\vstest\src\vstest.console\Processors\ListFullyQualifiedTestsArgumentProcessor.cs (1)
333foreach (var testProperty in testCase.Properties)