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