From 28bd7b5ee5138f0b0ec81949edc2969b9dcbe7dd Mon Sep 17 00:00:00 2001 From: Flepp Jann Date: Fri, 4 Dec 2020 09:12:02 +0100 Subject: [PATCH 1/2] Implemented Workitem support in TRX logger --- .../Interfaces/ITestElement.cs | 1 + .../ObjectModel/TestElement.cs | 18 ++ .../ObjectModel/Workitems.cs | 237 ++++++++++++++++++ .../Utility/Converter.cs | 7 + .../TrxLoggerTests.cs | 22 +- .../Utility/ConverterTests.cs | 16 ++ 6 files changed, 298 insertions(+), 3 deletions(-) create mode 100644 src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/Workitems.cs diff --git a/src/Microsoft.TestPlatform.Extensions.TrxLogger/Interfaces/ITestElement.cs b/src/Microsoft.TestPlatform.Extensions.TrxLogger/Interfaces/ITestElement.cs index 92d7db22f4..cc0b98d6ca 100644 --- a/src/Microsoft.TestPlatform.Extensions.TrxLogger/Interfaces/ITestElement.cs +++ b/src/Microsoft.TestPlatform.Extensions.TrxLogger/Interfaces/ITestElement.cs @@ -16,6 +16,7 @@ internal interface ITestElement TestExecId ParentExecutionId { get; set; } TestListCategoryId CategoryId { get; set; } TestCategoryItemCollection TestCategories { get; } + WorkitemCollection Workitems { get; set; } TestType TestType { get; } } } diff --git a/src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/TestElement.cs b/src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/TestElement.cs index 9562822962..e43234d78a 100644 --- a/src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/TestElement.cs +++ b/src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/TestElement.cs @@ -30,6 +30,7 @@ internal abstract class TestElement : ITestElement, IXmlTestStore protected TestExecId executionId; protected TestExecId parentExecutionId; protected TestCategoryItemCollection testCategories; + protected WorkitemCollection workitems; protected TestListCategoryId catId; public TestElement(Guid id, string name, string adapter) @@ -161,6 +162,20 @@ public TestCategoryItemCollection TestCategories } } + /// + /// Gets or sets the work items. + /// + public WorkitemCollection Workitems + { + get { return this.workitems; } + + set + { + EqtAssert.ParameterNotNull(value, "value"); + this.workitems = value; + } + } + /// /// Gets the adapter name. /// @@ -230,6 +245,8 @@ public virtual void Save(System.Xml.XmlElement element, XmlTestStoreParameters p if (this.parentExecutionId != null) h.SaveGuid(element, "Execution/@parentId", this.parentExecutionId.Id); + h.SaveObject(this.workitems, element, "Workitems", parameters); + XmlTestStoreParameters testIdParameters = XmlTestStoreParameters.GetParameters(); testIdParameters[TestId.IdLocationKey] = "@id"; h.SaveObject(this.id, element, testIdParameters); @@ -245,6 +262,7 @@ private void Initialize() this.executionId = TestExecId.Empty; this.parentExecutionId = TestExecId.Empty; this.testCategories = new TestCategoryItemCollection(); + this.workitems = new WorkitemCollection(); this.isRunnable = true; this.catId = TestListCategoryId.Uncategorized; } diff --git a/src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/Workitems.cs b/src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/Workitems.cs new file mode 100644 index 0000000000..9c9feaab98 --- /dev/null +++ b/src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/Workitems.cs @@ -0,0 +1,237 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +namespace Microsoft.TestPlatform.Extensions.TrxLogger.ObjectModel +{ + using System; + using System.Globalization; + using System.Text; + + using Microsoft.TestPlatform.Extensions.TrxLogger.Utility; + using Microsoft.TestPlatform.Extensions.TrxLogger.XML; + + #region Workitem + /// + /// Stores an int which represents a workitem + /// + internal sealed class Workitem : IXmlTestStore + { + #region Fields + [StoreXmlField(Location = ".")] + private int id = 0; + + #endregion + + #region Constructors + /// + /// Create a new item with the workitem set + /// + /// The workitem. + public Workitem(int workitemId) + { + this.id = workitemId; + } + + #endregion + + #region Properties/Methods + /// + /// Gets the id for this Workitem + /// + public int Id + { + get + { + return this.id; + } + } + + #endregion + + #region Methods - overrides + /// + /// Compare the values of the items + /// + /// Value being compared to. + /// True if the values are the same and false otherwise. + public override bool Equals(object other) + { + Workitem otherItem = other as Workitem; + if (otherItem == null) + { + return false; + } + return this.id == otherItem.id; + } + + /// + /// Convert the workitem to a hashcode + /// + /// Hashcode of the workitem. + public override int GetHashCode() + { + return this.id.GetHashCode(); + } + + /// + /// Convert the workitem to a string + /// + /// The workitem. + public override string ToString() + { + return this.id.ToString(CultureInfo.InvariantCulture); + } + #endregion + + #region IXmlTestStore Members + + /// + /// Saves the class under the XmlElement. + /// + /// XmlElement element + /// XmlTestStoreParameters parameters + public void Save(System.Xml.XmlElement element, XmlTestStoreParameters parameters) + { + new XmlPersistence().SaveSingleFields(element, this, parameters); + } + + #endregion + } + #endregion + + #region WorkitemCollection + /// + /// A collection of ints represent the workitems + /// + internal sealed class WorkitemCollection : EqtBaseCollection + { + #region Constructors + /// + /// Creates an empty WorkitemCollection. + /// + public WorkitemCollection() + { + } + + /// + /// Create a new WorkitemCollection based on the int array. + /// + /// Add these items to the collection. + public WorkitemCollection(int[] items) + { + EqtAssert.ParameterNotNull(items, "items"); + foreach (int i in items) + { + this.Add(new Workitem(i)); + } + } + + #endregion + + #region Methods + /// + /// Adds the workitem. + /// + /// Workitem to be added. + public void Add(int item) + { + this.Add(new Workitem(item)); + } + + /// + /// Adds the workitem. + /// + /// Workitem to be added. + public override void Add(Workitem item) + { + EqtAssert.ParameterNotNull(item, "item"); + base.Add(item); + } + + /// + /// Convert the WorkitemCollection to a string. + /// each item is separated by a comma (,) + /// + /// + public override string ToString() + { + StringBuilder returnString = new StringBuilder(); + if (this.Count > 0) + { + returnString.Append(","); + foreach (Workitem item in this) + { + returnString.Append(item); + returnString.Append(","); + } + } + + return returnString.ToString(); + } + + /// + /// Convert the WorkitemCollection to an array of ints. + /// + /// Array of ints containing the workitems. + public int[] ToArray() + { + int[] result = new int[this.Count]; + + int i = 0; + foreach (Workitem item in this) + { + result[i++] = item.Id; + } + + return result; + } + + /// + /// Compare the collection items + /// + /// other collection + /// true if the collections contain the same items + public override bool Equals(object obj) + { + WorkitemCollection other = obj as WorkitemCollection; + bool result = false; + + if (other == null) + { + result = false; + } + else if (object.ReferenceEquals(this, other)) + { + result = true; + } + else if (this.Count != other.Count) + { + result = false; + } + else + { + foreach (Workitem item in this) + { + if (!other.Contains(item)) + { + result = false; + break; + } + } + } + + return result; + } + + /// + /// Return the hash code of this collection + /// + /// The hashcode. + public override int GetHashCode() + { + return base.GetHashCode(); + } + #endregion + } + #endregion +} diff --git a/src/Microsoft.TestPlatform.Extensions.TrxLogger/Utility/Converter.cs b/src/Microsoft.TestPlatform.Extensions.TrxLogger/Utility/Converter.cs index 3ca84b4694..072df021cc 100644 --- a/src/Microsoft.TestPlatform.Extensions.TrxLogger/Utility/Converter.cs +++ b/src/Microsoft.TestPlatform.Extensions.TrxLogger/Utility/Converter.cs @@ -67,6 +67,13 @@ public ITestElement ToTestElement( testElement.TestCategories.Add(testCategory); } + var workItems = GetCustomPropertyValueFromTestCase(rockSteadyTestCase, "WorkItemIds") + .Select(workItem => int.Parse(workItem)); + foreach (int workItem in workItems) + { + testElement.Workitems.Add(workItem); + } + return testElement; } diff --git a/test/Microsoft.TestPlatform.Extensions.TrxLogger.UnitTests/TrxLoggerTests.cs b/test/Microsoft.TestPlatform.Extensions.TrxLogger.UnitTests/TrxLoggerTests.cs index c55c000053..6294cbed96 100644 --- a/test/Microsoft.TestPlatform.Extensions.TrxLogger.UnitTests/TrxLoggerTests.cs +++ b/test/Microsoft.TestPlatform.Extensions.TrxLogger.UnitTests/TrxLoggerTests.cs @@ -736,13 +736,11 @@ public void CustomTrxFileNameShouldConstructFromLogFileParameter() Assert.AreEqual(Path.Combine(TrxLoggerTests.DefaultTestRunDirectory, TrxLoggerTests.DefaultLogFileNameParameterValue), this.testableTrxLogger.trxFile, "Wrong Trx file name"); } - - /// /// Unit test for reading TestCategories from the TestCase which is part of test result. /// [TestMethod] - public void GetCustomPropertyValueFromTestCaseShouldReadCategoyrAttributesFromTestCase() + public void GetCustomPropertyValueFromTestCaseShouldReadCategoryAttributesFromTestCase() { ObjectModel.TestCase testCase1 = CreateTestCase("TestCase1"); TestProperty testProperty = TestProperty.Register("MSTestDiscoverer.TestCategory", "String array property", string.Empty, string.Empty, typeof(string[]), null, TestPropertyAttributes.Hidden, typeof(TestObject)); @@ -759,6 +757,24 @@ public void GetCustomPropertyValueFromTestCaseShouldReadCategoyrAttributesFromTe CollectionAssert.AreEqual(listCategoriesExpected, listCategoriesActual); } + [TestMethod] + public void GetCustomPropertyValueFromTestCaseShouldReadWorkitemAttributesFromTestCase() + { + ObjectModel.TestCase testCase1 = CreateTestCase("TestCase1"); + TestProperty testProperty = TestProperty.Register("WorkItemIds", "String array property", string.Empty, string.Empty, typeof(string[]), null, TestPropertyAttributes.Hidden, typeof(TestObject)); + + testCase1.SetPropertyValue(testProperty, new[] { "99999", "0" }); + + var converter = new Converter(new Mock().Object, new TrxFileHelper()); + List listWorkitemsActual = converter.GetCustomPropertyValueFromTestCase(testCase1, "WorkItemIds"); + + List listWorkitemsExpected = new List(); + listWorkitemsExpected.Add("99999"); + listWorkitemsExpected.Add("0"); + + CollectionAssert.AreEqual(listWorkitemsExpected, listWorkitemsActual); + } + [TestMethod] public void CRLFCharactersShouldGetRetainedInTrx() { diff --git a/test/Microsoft.TestPlatform.Extensions.TrxLogger.UnitTests/Utility/ConverterTests.cs b/test/Microsoft.TestPlatform.Extensions.TrxLogger.UnitTests/Utility/ConverterTests.cs index 6311ba1715..070ebc3104 100644 --- a/test/Microsoft.TestPlatform.Extensions.TrxLogger.UnitTests/Utility/ConverterTests.cs +++ b/test/Microsoft.TestPlatform.Extensions.TrxLogger.UnitTests/Utility/ConverterTests.cs @@ -98,6 +98,22 @@ public void ToTestElementShouldAssignTestCategoryOfUnitTestElement() CollectionAssert.AreEqual(expected, unitTestElement.TestCategories.ToArray().OrderByDescending(x => x.ToString()).ToArray()); } + [TestMethod] + public void ToTestElementShouldAssignWorkitemOfUnitTestElement() + { + TestPlatformObjectModel.TestCase testCase = CreateTestCase("TestCase1"); + TestPlatformObjectModel.TestResult result = new TestPlatformObjectModel.TestResult(testCase); + TestProperty testProperty = TestProperty.Register("WorkItemIds", "String array property", string.Empty, string.Empty, typeof(string[]), null, TestPropertyAttributes.Hidden, typeof(TestObject)); + + testCase.SetPropertyValue(testProperty, new[] { "3", "99999", "0" }); + + var unitTestElement = this.converter.ToTestElement(testCase.Id, Guid.Empty, Guid.Empty, testCase.DisplayName, TrxLoggerConstants.UnitTestType, testCase); + + int[] expected = new[] { 0, 3, 99999 }; + + CollectionAssert.AreEquivalent(expected, unitTestElement.Workitems.ToArray()); + } + /// /// Unit test for regression when there's no test categories. /// From 189a56a25b14d07a1d9e709e80f88404eb6b8f00 Mon Sep 17 00:00:00 2001 From: Jann Flepp Date: Tue, 8 Dec 2020 21:21:33 +0100 Subject: [PATCH 2/2] Renamed Workitem to WorkItem --- .../Interfaces/ITestElement.cs | 2 +- .../ObjectModel/TestElement.cs | 12 ++--- .../{Workitems.cs => WorkItems.cs} | 52 +++++++++++-------- .../Utility/Converter.cs | 2 +- .../TrxLoggerTests.cs | 12 ++--- .../Utility/ConverterTests.cs | 2 +- 6 files changed, 44 insertions(+), 38 deletions(-) rename src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/{Workitems.cs => WorkItems.cs} (79%) diff --git a/src/Microsoft.TestPlatform.Extensions.TrxLogger/Interfaces/ITestElement.cs b/src/Microsoft.TestPlatform.Extensions.TrxLogger/Interfaces/ITestElement.cs index cc0b98d6ca..39121ae3e0 100644 --- a/src/Microsoft.TestPlatform.Extensions.TrxLogger/Interfaces/ITestElement.cs +++ b/src/Microsoft.TestPlatform.Extensions.TrxLogger/Interfaces/ITestElement.cs @@ -16,7 +16,7 @@ internal interface ITestElement TestExecId ParentExecutionId { get; set; } TestListCategoryId CategoryId { get; set; } TestCategoryItemCollection TestCategories { get; } - WorkitemCollection Workitems { get; set; } + WorkItemCollection WorkItems { get; set; } TestType TestType { get; } } } diff --git a/src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/TestElement.cs b/src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/TestElement.cs index e43234d78a..c35fa8b3a1 100644 --- a/src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/TestElement.cs +++ b/src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/TestElement.cs @@ -30,7 +30,7 @@ internal abstract class TestElement : ITestElement, IXmlTestStore protected TestExecId executionId; protected TestExecId parentExecutionId; protected TestCategoryItemCollection testCategories; - protected WorkitemCollection workitems; + protected WorkItemCollection workItems; protected TestListCategoryId catId; public TestElement(Guid id, string name, string adapter) @@ -165,14 +165,14 @@ public TestCategoryItemCollection TestCategories /// /// Gets or sets the work items. /// - public WorkitemCollection Workitems + public WorkItemCollection WorkItems { - get { return this.workitems; } + get { return this.workItems; } set { EqtAssert.ParameterNotNull(value, "value"); - this.workitems = value; + this.workItems = value; } } @@ -245,7 +245,7 @@ public virtual void Save(System.Xml.XmlElement element, XmlTestStoreParameters p if (this.parentExecutionId != null) h.SaveGuid(element, "Execution/@parentId", this.parentExecutionId.Id); - h.SaveObject(this.workitems, element, "Workitems", parameters); + h.SaveObject(this.workItems, element, "Workitems", parameters); XmlTestStoreParameters testIdParameters = XmlTestStoreParameters.GetParameters(); testIdParameters[TestId.IdLocationKey] = "@id"; @@ -262,7 +262,7 @@ private void Initialize() this.executionId = TestExecId.Empty; this.parentExecutionId = TestExecId.Empty; this.testCategories = new TestCategoryItemCollection(); - this.workitems = new WorkitemCollection(); + this.workItems = new WorkItemCollection(); this.isRunnable = true; this.catId = TestListCategoryId.Uncategorized; } diff --git a/src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/Workitems.cs b/src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/WorkItems.cs similarity index 79% rename from src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/Workitems.cs rename to src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/WorkItems.cs index 9c9feaab98..c21769539d 100644 --- a/src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/Workitems.cs +++ b/src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/WorkItems.cs @@ -6,15 +6,15 @@ namespace Microsoft.TestPlatform.Extensions.TrxLogger.ObjectModel using System; using System.Globalization; using System.Text; - + using System.Xml; using Microsoft.TestPlatform.Extensions.TrxLogger.Utility; using Microsoft.TestPlatform.Extensions.TrxLogger.XML; - #region Workitem + #region WorkItem /// /// Stores an int which represents a workitem /// - internal sealed class Workitem : IXmlTestStore + internal sealed class WorkItem : IXmlTestStore { #region Fields [StoreXmlField(Location = ".")] @@ -27,7 +27,7 @@ internal sealed class Workitem : IXmlTestStore /// Create a new item with the workitem set /// /// The workitem. - public Workitem(int workitemId) + public WorkItem(int workitemId) { this.id = workitemId; } @@ -36,7 +36,7 @@ public Workitem(int workitemId) #region Properties/Methods /// - /// Gets the id for this Workitem + /// Gets the id for this WorkItem /// public int Id { @@ -56,7 +56,7 @@ public int Id /// True if the values are the same and false otherwise. public override bool Equals(object other) { - Workitem otherItem = other as Workitem; + WorkItem otherItem = other as WorkItem; if (otherItem == null) { return false; @@ -99,30 +99,30 @@ public void Save(System.Xml.XmlElement element, XmlTestStoreParameters parameter } #endregion - #region WorkitemCollection + #region WorkItemCollection /// /// A collection of ints represent the workitems /// - internal sealed class WorkitemCollection : EqtBaseCollection + internal sealed class WorkItemCollection : EqtBaseCollection { #region Constructors /// - /// Creates an empty WorkitemCollection. + /// Creates an empty WorkItemCollection. /// - public WorkitemCollection() + public WorkItemCollection() { } /// - /// Create a new WorkitemCollection based on the int array. + /// Create a new WorkItemCollection based on the int array. /// /// Add these items to the collection. - public WorkitemCollection(int[] items) + public WorkItemCollection(int[] items) { EqtAssert.ParameterNotNull(items, "items"); foreach (int i in items) { - this.Add(new Workitem(i)); + this.Add(new WorkItem(i)); } } @@ -132,24 +132,24 @@ public WorkitemCollection(int[] items) /// /// Adds the workitem. /// - /// Workitem to be added. + /// WorkItem to be added. public void Add(int item) { - this.Add(new Workitem(item)); + this.Add(new WorkItem(item)); } /// /// Adds the workitem. /// - /// Workitem to be added. - public override void Add(Workitem item) + /// WorkItem to be added. + public override void Add(WorkItem item) { EqtAssert.ParameterNotNull(item, "item"); base.Add(item); } /// - /// Convert the WorkitemCollection to a string. + /// Convert the WorkItemCollection to a string. /// each item is separated by a comma (,) /// /// @@ -159,7 +159,7 @@ public override string ToString() if (this.Count > 0) { returnString.Append(","); - foreach (Workitem item in this) + foreach (WorkItem item in this) { returnString.Append(item); returnString.Append(","); @@ -170,7 +170,7 @@ public override string ToString() } /// - /// Convert the WorkitemCollection to an array of ints. + /// Convert the WorkItemCollection to an array of ints. /// /// Array of ints containing the workitems. public int[] ToArray() @@ -178,7 +178,7 @@ public int[] ToArray() int[] result = new int[this.Count]; int i = 0; - foreach (Workitem item in this) + foreach (WorkItem item in this) { result[i++] = item.Id; } @@ -193,7 +193,7 @@ public int[] ToArray() /// true if the collections contain the same items public override bool Equals(object obj) { - WorkitemCollection other = obj as WorkitemCollection; + WorkItemCollection other = obj as WorkItemCollection; bool result = false; if (other == null) @@ -210,7 +210,7 @@ public override bool Equals(object obj) } else { - foreach (Workitem item in this) + foreach (WorkItem item in this) { if (!other.Contains(item)) { @@ -231,6 +231,12 @@ public override int GetHashCode() { return base.GetHashCode(); } + + public override void Save(XmlElement element, XmlTestStoreParameters parameters) + { + XmlPersistence xmlPersistence = new XmlPersistence(); + xmlPersistence.SaveHashtable(this.container, element, ".", ".", null, "Workitem", parameters); + } #endregion } #endregion diff --git a/src/Microsoft.TestPlatform.Extensions.TrxLogger/Utility/Converter.cs b/src/Microsoft.TestPlatform.Extensions.TrxLogger/Utility/Converter.cs index 072df021cc..eeb441f0d4 100644 --- a/src/Microsoft.TestPlatform.Extensions.TrxLogger/Utility/Converter.cs +++ b/src/Microsoft.TestPlatform.Extensions.TrxLogger/Utility/Converter.cs @@ -71,7 +71,7 @@ public ITestElement ToTestElement( .Select(workItem => int.Parse(workItem)); foreach (int workItem in workItems) { - testElement.Workitems.Add(workItem); + testElement.WorkItems.Add(workItem); } return testElement; diff --git a/test/Microsoft.TestPlatform.Extensions.TrxLogger.UnitTests/TrxLoggerTests.cs b/test/Microsoft.TestPlatform.Extensions.TrxLogger.UnitTests/TrxLoggerTests.cs index 6294cbed96..67dd775c4a 100644 --- a/test/Microsoft.TestPlatform.Extensions.TrxLogger.UnitTests/TrxLoggerTests.cs +++ b/test/Microsoft.TestPlatform.Extensions.TrxLogger.UnitTests/TrxLoggerTests.cs @@ -758,7 +758,7 @@ public void GetCustomPropertyValueFromTestCaseShouldReadCategoryAttributesFromTe } [TestMethod] - public void GetCustomPropertyValueFromTestCaseShouldReadWorkitemAttributesFromTestCase() + public void GetCustomPropertyValueFromTestCaseShouldReadWorkItemAttributesFromTestCase() { ObjectModel.TestCase testCase1 = CreateTestCase("TestCase1"); TestProperty testProperty = TestProperty.Register("WorkItemIds", "String array property", string.Empty, string.Empty, typeof(string[]), null, TestPropertyAttributes.Hidden, typeof(TestObject)); @@ -766,13 +766,13 @@ public void GetCustomPropertyValueFromTestCaseShouldReadWorkitemAttributesFromTe testCase1.SetPropertyValue(testProperty, new[] { "99999", "0" }); var converter = new Converter(new Mock().Object, new TrxFileHelper()); - List listWorkitemsActual = converter.GetCustomPropertyValueFromTestCase(testCase1, "WorkItemIds"); + List listWorkItemsActual = converter.GetCustomPropertyValueFromTestCase(testCase1, "WorkItemIds"); - List listWorkitemsExpected = new List(); - listWorkitemsExpected.Add("99999"); - listWorkitemsExpected.Add("0"); + List listWorkItemsExpected = new List(); + listWorkItemsExpected.Add("99999"); + listWorkItemsExpected.Add("0"); - CollectionAssert.AreEqual(listWorkitemsExpected, listWorkitemsActual); + CollectionAssert.AreEqual(listWorkItemsExpected, listWorkItemsActual); } [TestMethod] diff --git a/test/Microsoft.TestPlatform.Extensions.TrxLogger.UnitTests/Utility/ConverterTests.cs b/test/Microsoft.TestPlatform.Extensions.TrxLogger.UnitTests/Utility/ConverterTests.cs index 070ebc3104..e4c2323f83 100644 --- a/test/Microsoft.TestPlatform.Extensions.TrxLogger.UnitTests/Utility/ConverterTests.cs +++ b/test/Microsoft.TestPlatform.Extensions.TrxLogger.UnitTests/Utility/ConverterTests.cs @@ -111,7 +111,7 @@ public void ToTestElementShouldAssignWorkitemOfUnitTestElement() int[] expected = new[] { 0, 3, 99999 }; - CollectionAssert.AreEquivalent(expected, unitTestElement.Workitems.ToArray()); + CollectionAssert.AreEquivalent(expected, unitTestElement.WorkItems.ToArray()); } ///