diff --git a/src/DataCollectors/Microsoft.TestPlatform.Extensions.EventLogCollector/CollectorNameValueConfigurationManager.cs b/src/DataCollectors/Microsoft.TestPlatform.Extensions.EventLogCollector/CollectorNameValueConfigurationManager.cs index 2d317184fe..39d47718fe 100644 --- a/src/DataCollectors/Microsoft.TestPlatform.Extensions.EventLogCollector/CollectorNameValueConfigurationManager.cs +++ b/src/DataCollectors/Microsoft.TestPlatform.Extensions.EventLogCollector/CollectorNameValueConfigurationManager.cs @@ -16,24 +16,15 @@ namespace Microsoft.TestPlatform.Extensions.EventLogCollector; /// internal class CollectorNameValueConfigurationManager { - #region Private constants // Configuration XML constants private const string SettingNameAttributeName = "name"; private const string SettingValueAttributeName = "value"; - #endregion - - #region Private fields - /// /// The name/value pairs loaded from the configuration XML element /// - #endregion - - #region Constructor - /// /// Initializes a new instance of the class. /// Loads the configuration name/value information from the provided XML element into a dictionary @@ -88,10 +79,6 @@ public CollectorNameValueConfigurationManager(XmlElement configurationElement) } } - #endregion - - #region Public properties - internal IDictionary NameValuePairs { get; } = new Dictionary(); /// @@ -114,5 +101,4 @@ public string this[string name] set => NameValuePairs[name] = value; } - #endregion } diff --git a/src/DataCollectors/Microsoft.TestPlatform.Extensions.EventLogCollector/EventLogDataCollector.cs b/src/DataCollectors/Microsoft.TestPlatform.Extensions.EventLogCollector/EventLogDataCollector.cs index 31ec827e95..ec02badf8a 100644 --- a/src/DataCollectors/Microsoft.TestPlatform.Extensions.EventLogCollector/EventLogDataCollector.cs +++ b/src/DataCollectors/Microsoft.TestPlatform.Extensions.EventLogCollector/EventLogDataCollector.cs @@ -27,8 +27,6 @@ namespace Microsoft.TestPlatform.Extensions.EventLogCollector; [DataCollectorFriendlyName("Event Log")] public class EventLogDataCollector : DataCollector { - #region Constants - /// /// The event log file name. /// @@ -39,10 +37,6 @@ public class EventLogDataCollector : DataCollector /// private const string DefaultUri = @"datacollector://Microsoft/EventLog/2.0"; - #endregion - - #region Private fields - /// /// Event handler delegate for the SessionStart event /// @@ -98,10 +92,6 @@ public class EventLogDataCollector : DataCollector /// private readonly IDictionary _eventLogContainerMap = new Dictionary(); - #endregion - - #region Constructor - /// /// Initializes a new instance of the class. /// @@ -128,10 +118,6 @@ internal EventLogDataCollector(IFileHelper fileHelper) _fileHelper = fileHelper; } - #endregion - - #region Internal Fields - internal int MaxEntries { get; private set; } internal ISet EventSources { get; private set; } @@ -145,10 +131,6 @@ internal EventLogDataCollector(IFileHelper fileHelper) /// internal Dictionary ContextMap { get; } - #endregion - - #region DataCollector Members - /// /// Initializes the data collector /// @@ -197,10 +179,6 @@ public override void Initialize( events.TestCaseEnd += _testCaseEndEventHandler; } - #endregion - - #region Internal - /// /// The write event logs. /// @@ -297,10 +275,6 @@ internal string WriteEventLogs(List eventLogEntries, int maxLogEn return eventLogPath; } - #endregion - - #region IDisposable Members - /// /// Cleans up resources allocated by the data collector /// @@ -325,8 +299,6 @@ protected override void Dispose(bool disposing) RemoveTempEventLogDirs(_eventLogDirectories); } - #endregion - private static ISet ParseCommaSeparatedList(string commaSeparatedList) { ISet strings = new HashSet(); @@ -339,8 +311,6 @@ private static ISet ParseCommaSeparatedList(string commaSeparatedList) return strings; } - #region Event Handlers - private void OnSessionStart(object sender, SessionStartEventArgs e) { ValidateArg.NotNull(e, "SessionStartEventArgs"); @@ -392,10 +362,6 @@ private void OnTestCaseEnd(object sender, TestCaseEndEventArgs e) WriteCollectedEventLogEntries(e.Context, false, TimeSpan.MaxValue, DateTime.UtcNow); } - #endregion - - #region Private methods - private void RemoveTempEventLogDirs(List tempDirs) { if (tempDirs != null) @@ -596,5 +562,4 @@ private EventLogSessionContext GetEventLogSessionContext(DataCollectionContext d return eventLogSessionContext; } - #endregion } diff --git a/src/DataCollectors/Microsoft.TestPlatform.Extensions.EventLogCollector/EventLogXmlWriter.cs b/src/DataCollectors/Microsoft.TestPlatform.Extensions.EventLogCollector/EventLogXmlWriter.cs index aa0d550917..b2983cbd0f 100644 --- a/src/DataCollectors/Microsoft.TestPlatform.Extensions.EventLogCollector/EventLogXmlWriter.cs +++ b/src/DataCollectors/Microsoft.TestPlatform.Extensions.EventLogCollector/EventLogXmlWriter.cs @@ -20,8 +20,6 @@ namespace Microsoft.TestPlatform.Extensions.EventLogCollector; /// internal static class EventLogXmlWriter { - #region Public methods - /// /// The write event log entries to xml file. /// @@ -83,4 +81,3 @@ public static void WriteEventLogEntriesToXmlFile(string xmlFilePath, List /// RawMessage received handler for getting rawmessages directly from the host /// diff --git a/src/Microsoft.TestPlatform.Client/Discovery/DiscoveryRequest.cs b/src/Microsoft.TestPlatform.Client/Discovery/DiscoveryRequest.cs index 083c1665e3..cf5ff1970a 100644 --- a/src/Microsoft.TestPlatform.Client/Discovery/DiscoveryRequest.cs +++ b/src/Microsoft.TestPlatform.Client/Discovery/DiscoveryRequest.cs @@ -200,8 +200,6 @@ public DiscoveryCriteria DiscoveryCriteria /// internal ITestLoggerManager LoggerManager { get; } - #region ITestDiscoveryEventsHandler2 Methods - /// public void HandleDiscoveryComplete(DiscoveryCompleteEventArgs discoveryCompleteEventArgs, IEnumerable lastChunk) { @@ -419,10 +417,6 @@ private string UpdateRawMessageWithTelemetryInfo(DiscoveryCompletePayload discov return rawMessage; } - #endregion - - #region IDisposable implementation - /// /// Performs application-defined tasks associated with freeing, releasing, or /// resetting unmanaged resources. @@ -459,10 +453,6 @@ private void Dispose(bool disposing) EqtTrace.Info("DiscoveryRequest.Dispose: Completed."); } - #endregion - - #region privates fields - /// /// Request Data /// @@ -488,5 +478,4 @@ private void Dispose(bool disposing) /// private DateTime _discoveryStartTime; - #endregion } diff --git a/src/Microsoft.TestPlatform.Client/Execution/TestRunRequest.cs b/src/Microsoft.TestPlatform.Client/Execution/TestRunRequest.cs index 325218b656..76c64fe106 100644 --- a/src/Microsoft.TestPlatform.Client/Execution/TestRunRequest.cs +++ b/src/Microsoft.TestPlatform.Client/Execution/TestRunRequest.cs @@ -94,8 +94,6 @@ internal TestRunRequest(IRequestData requestData, TestRunCriteria testRunCriteri _requestData = requestData; } - #region ITestRunRequest - /// /// Execute the test run asynchronously /// @@ -329,10 +327,6 @@ internal ITestLoggerManager LoggerManager get; private set; } - #endregion - - #region IDisposable implementation - // Summary: // Performs application-defined tasks associated with freeing, releasing, or // resetting unmanaged resources. @@ -343,8 +337,6 @@ public void Dispose() GC.SuppressFinalize(this); } - #endregion - /// /// The criteria/config for this test run request. /// diff --git a/src/Microsoft.TestPlatform.Client/Friends.cs b/src/Microsoft.TestPlatform.Client/Friends.cs index 90a5d9db6f..10115cbe91 100644 --- a/src/Microsoft.TestPlatform.Client/Friends.cs +++ b/src/Microsoft.TestPlatform.Client/Friends.cs @@ -3,12 +3,5 @@ using System.Runtime.CompilerServices; -#region Product Assemblies - -#endregion - -#region Test Assemblies - [assembly: InternalsVisibleTo("Microsoft.TestPlatform.Client.UnitTests, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")] -#endregion diff --git a/src/Microsoft.TestPlatform.Common/DataCollection/DataCollectionAttachmentManager.cs b/src/Microsoft.TestPlatform.Common/DataCollection/DataCollectionAttachmentManager.cs index bc7b667b43..4826e34f94 100644 --- a/src/Microsoft.TestPlatform.Common/DataCollection/DataCollectionAttachmentManager.cs +++ b/src/Microsoft.TestPlatform.Common/DataCollection/DataCollectionAttachmentManager.cs @@ -43,8 +43,6 @@ internal class DataCollectionAttachmentManager : IDataCollectionAttachmentManage { private readonly object _attachmentTaskLock = new(); - #region Fields - /// /// Default results directory to be used when user didn't specify. /// @@ -70,10 +68,6 @@ internal class DataCollectionAttachmentManager : IDataCollectionAttachmentManage /// private readonly IFileHelper _fileHelper; - #endregion - - #region Constructor - /// /// Initializes a new instance of the class. /// @@ -94,10 +88,6 @@ protected DataCollectionAttachmentManager(IFileHelper fileHelper) AttachmentSets = new ConcurrentDictionary>(); } - #endregion - - #region Properties - /// /// Gets the session output directory. /// @@ -110,10 +100,6 @@ internal ConcurrentDictionary public void Initialize(SessionId id, string outputDirectory, IMessageSink messageSink) { @@ -210,10 +196,6 @@ public void Cancel() _cancellationTokenSource.Cancel(); } - #endregion - - #region private methods - /// /// Sanity checks on CopyRequestData /// @@ -378,5 +360,4 @@ private void LogError(string errorMessage, Uri collectorUri, string collectorFri _messageSink.SendMessage(args); } - #endregion } diff --git a/src/Microsoft.TestPlatform.Common/DataCollection/DataCollectionEnvironmentVariable.cs b/src/Microsoft.TestPlatform.Common/DataCollection/DataCollectionEnvironmentVariable.cs index 878ab9693e..6f4e40a390 100644 --- a/src/Microsoft.TestPlatform.Common/DataCollection/DataCollectionEnvironmentVariable.cs +++ b/src/Microsoft.TestPlatform.Common/DataCollection/DataCollectionEnvironmentVariable.cs @@ -17,8 +17,6 @@ namespace Microsoft.VisualStudio.TestPlatform.Common.DataCollector; /// internal class DataCollectionEnvironmentVariable { - #region Fields - /// /// Variable name and requested value /// @@ -29,10 +27,6 @@ internal class DataCollectionEnvironmentVariable /// private readonly List _dataCollectorsThatRequested; - #endregion - - #region Constructors - /// /// Initializes a new instance of the class. /// @@ -53,10 +47,6 @@ public DataCollectionEnvironmentVariable( _dataCollectorsThatRequested = new List { requestingDataCollectorFriendlyName }; } - #endregion - - #region Properties - /// /// Gets variable name. /// @@ -90,10 +80,6 @@ public string FirstDataCollectorThatRequested } } - #endregion - - #region Methods - /// /// Adds the data collector to the list of data collectors that requested this variable. /// @@ -104,5 +90,4 @@ public void AddRequestingDataCollector(string requestingDataCollectorFriendlyNam _dataCollectorsThatRequested.Add(requestingDataCollectorFriendlyName); } - #endregion } diff --git a/src/Microsoft.TestPlatform.Common/DataCollection/DataCollectionManager.cs b/src/Microsoft.TestPlatform.Common/DataCollection/DataCollectionManager.cs index 2cd513df9d..0134efd53b 100644 --- a/src/Microsoft.TestPlatform.Common/DataCollection/DataCollectionManager.cs +++ b/src/Microsoft.TestPlatform.Common/DataCollection/DataCollectionManager.cs @@ -382,8 +382,6 @@ private void CleanupPlugins() EqtTrace.Info("DataCollectionManager.CleanupPlugins: CleanupPlugins finished"); } - #region Load and Initialize DataCollectors - /// /// Tries to get uri of the data collector corresponding to the friendly name. If no such data collector exists return null. /// @@ -571,8 +569,6 @@ private List GetDataCollectorsEnabledForRun(DataCollectio return runEnabledDataCollectors; } - #endregion - /// /// Sends a warning message against the session which is not associated with a data collector. /// diff --git a/src/Microsoft.TestPlatform.Common/Exceptions/InvalidLoggerException.cs b/src/Microsoft.TestPlatform.Common/Exceptions/InvalidLoggerException.cs index 4d1f46e587..c6fa7a5ca8 100644 --- a/src/Microsoft.TestPlatform.Common/Exceptions/InvalidLoggerException.cs +++ b/src/Microsoft.TestPlatform.Common/Exceptions/InvalidLoggerException.cs @@ -11,8 +11,6 @@ namespace Microsoft.VisualStudio.TestPlatform.Common.Exceptions; public class InvalidLoggerException : TestPlatformException { - #region Constructors - /// /// Initializes with the message. /// @@ -32,5 +30,4 @@ public InvalidLoggerException(string message, Exception innerException) { } - #endregion } diff --git a/src/Microsoft.TestPlatform.Common/ExtensionFramework/TestDiscoveryExtensionManager.cs b/src/Microsoft.TestPlatform.Common/ExtensionFramework/TestDiscoveryExtensionManager.cs index 1a95f673b6..b15c48f77c 100644 --- a/src/Microsoft.TestPlatform.Common/ExtensionFramework/TestDiscoveryExtensionManager.cs +++ b/src/Microsoft.TestPlatform.Common/ExtensionFramework/TestDiscoveryExtensionManager.cs @@ -19,14 +19,8 @@ namespace Microsoft.VisualStudio.TestPlatform.Common.ExtensionFramework; /// internal class TestDiscoveryExtensionManager { - #region Fields - private static TestDiscoveryExtensionManager s_testDiscoveryExtensionManager; - #endregion - - #region Constructor - /// /// Default constructor. /// @@ -42,10 +36,6 @@ protected TestDiscoveryExtensionManager( UnfilteredDiscoverers = unfilteredDiscoverers; } - #endregion - - #region Properties - /// /// Gets the unfiltered list of test discoverers which are available. /// @@ -59,10 +49,6 @@ protected TestDiscoveryExtensionManager( /// public IEnumerable> Discoverers { get; private set; } - #endregion - - #region Factory - /// /// Gets an instance of the Test Discovery Extension Manager. /// @@ -151,7 +137,6 @@ internal static void Destroy() s_testDiscoveryExtensionManager = null; } - #endregion } /// diff --git a/src/Microsoft.TestPlatform.Common/ExtensionFramework/TestExecutorExtensionManager.cs b/src/Microsoft.TestPlatform.Common/ExtensionFramework/TestExecutorExtensionManager.cs index f99d977848..524fc3ff71 100644 --- a/src/Microsoft.TestPlatform.Common/ExtensionFramework/TestExecutorExtensionManager.cs +++ b/src/Microsoft.TestPlatform.Common/ExtensionFramework/TestExecutorExtensionManager.cs @@ -21,15 +21,9 @@ namespace Microsoft.VisualStudio.TestPlatform.Common.ExtensionFramework; /// internal class TestExecutorExtensionManager : TestExtensionManager { - #region Fields - private static TestExecutorExtensionManager s_testExecutorExtensionManager; private static readonly object Synclock = new(); - #endregion - - #region Constructor - /// /// Default constructor. /// @@ -48,9 +42,6 @@ protected TestExecutorExtensionManager( { } - #endregion - - #region Private Methods /// /// Merges two test extension lists. /// @@ -102,10 +93,6 @@ private static IEnumerable> MergeTestExtension return mergedTestExtensions; } - #endregion - - #region Factory Methods - /// /// Creates the TestExecutorExtensionManager. /// @@ -236,7 +223,6 @@ internal static void LoadAndInitializeAllExtensions(bool shouldThrowOnError) } } - #endregion } /// diff --git a/src/Microsoft.TestPlatform.Common/ExtensionFramework/TestExtensionManager.cs b/src/Microsoft.TestPlatform.Common/ExtensionFramework/TestExtensionManager.cs index ac80080b3f..f1be92a674 100644 --- a/src/Microsoft.TestPlatform.Common/ExtensionFramework/TestExtensionManager.cs +++ b/src/Microsoft.TestPlatform.Common/ExtensionFramework/TestExtensionManager.cs @@ -24,17 +24,11 @@ namespace Microsoft.VisualStudio.TestPlatform.Common.ExtensionFramework; internal abstract class TestExtensionManager where TMetadata : ITestExtensionCapabilities { - #region Fields - /// /// Used for logging errors. /// private readonly IMessageLogger _logger; - #endregion - - #region Constructor - /// /// Default constructor. /// @@ -64,10 +58,6 @@ protected TestExtensionManager( PopulateMap(); } - #endregion - - #region Properties - /// /// Gets unfiltered list of test extensions which are available. /// @@ -106,10 +96,6 @@ public Dictionary> TestExtensionByUri private set; } - #endregion - - #region Public Methods - /// /// Looks up the test extension by its URI. /// @@ -145,8 +131,6 @@ public LazyExtension TryGetTestExtension(string extension return testExtension; } - #endregion - /// /// Populate the extension map. /// diff --git a/src/Microsoft.TestPlatform.Common/ExtensionFramework/TestPluginCache.cs b/src/Microsoft.TestPlatform.Common/ExtensionFramework/TestPluginCache.cs index 08a0477c89..9b3b92b4f5 100644 --- a/src/Microsoft.TestPlatform.Common/ExtensionFramework/TestPluginCache.cs +++ b/src/Microsoft.TestPlatform.Common/ExtensionFramework/TestPluginCache.cs @@ -27,8 +27,6 @@ namespace Microsoft.VisualStudio.TestPlatform.Common.ExtensionFramework; /// Making this a singleton to offer better unit testing. public class TestPluginCache { - #region Private Members - private readonly Dictionary _resolvedAssemblies; private List _filterableExtensionPaths; @@ -48,10 +46,6 @@ public class TestPluginCache private readonly List _defaultExtensionPaths = new(); - #endregion - - #region Constructor - /// /// Initializes a new instance of the class. /// @@ -64,10 +58,6 @@ protected TestPluginCache() TestExtensions = null; } - #endregion - - #region Public Properties - public static TestPluginCache Instance { get @@ -87,10 +77,6 @@ internal set /// Returns null if discovery of extensions is not done. internal TestExtensions TestExtensions { get; private set; } - #endregion - - #region Public Methods - /// /// Gets a list of all extension paths filtered by input string. /// @@ -288,10 +274,6 @@ public void AddResolverSearchDirectories(string[] directories) _assemblyResolver.AddSearchDirectories(directories); } - #endregion - - #region Utility methods - internal IEnumerable DefaultExtensionPaths { get @@ -563,5 +545,4 @@ private void LogExtensions() } } - #endregion } diff --git a/src/Microsoft.TestPlatform.Common/ExtensionFramework/TestPluginDiscoverer.cs b/src/Microsoft.TestPlatform.Common/ExtensionFramework/TestPluginDiscoverer.cs index f79cf8ac48..83fea05791 100644 --- a/src/Microsoft.TestPlatform.Common/ExtensionFramework/TestPluginDiscoverer.cs +++ b/src/Microsoft.TestPlatform.Common/ExtensionFramework/TestPluginDiscoverer.cs @@ -35,8 +35,6 @@ public TestPluginDiscoverer() { } - #region Fields - #if WINDOWS_UAP private static HashSet platformAssemblies = new HashSet(new string[] { "MICROSOFT.VISUALSTUDIO.TESTPLATFORM.UNITTESTFRAMEWORK.DLL", @@ -53,10 +51,6 @@ public TestPluginDiscoverer() private const string SYSTEM_ASSEMBLY_PREFIX = "system."; #endif - #endregion - - #region Public Methods - /// /// Gets information about each of the test extensions available. /// @@ -83,10 +77,6 @@ public Dictionary GetTestExtensionsInformation extensionPaths) { // For C++ UWP adapter, & OLD C# UWP(MSTest V1) adapter @@ -270,5 +260,4 @@ private void GetTestExtensionFromType( } } - #endregion } diff --git a/src/Microsoft.TestPlatform.Common/ExtensionFramework/TestPluginManager.cs b/src/Microsoft.TestPlatform.Common/ExtensionFramework/TestPluginManager.cs index e6f581485e..f89092aaa3 100644 --- a/src/Microsoft.TestPlatform.Common/ExtensionFramework/TestPluginManager.cs +++ b/src/Microsoft.TestPlatform.Common/ExtensionFramework/TestPluginManager.cs @@ -19,8 +19,6 @@ internal class TestPluginManager { private static TestPluginManager s_instance; - #region Public Static Methods - /// /// Gets the singleton instance of TestPluginManager. /// @@ -88,10 +86,6 @@ public static T CreateTestExtension(Type extensionType!!) } } - #endregion - - #region Public Methods - /// /// Retrieves the test extension collections of given extension type. /// @@ -158,10 +152,6 @@ public void GetTestExtensions( GetExtensions(extensions, out unfiltered, out filtered); } - #endregion - - #region Private Methods - /// /// Prepares a List of TestPluginInformation> /// @@ -227,5 +217,4 @@ private void GetExtensions( filtered = filteredExtensions; } - #endregion } diff --git a/src/Microsoft.TestPlatform.Common/ExtensionFramework/Utilities/LazyExtension.cs b/src/Microsoft.TestPlatform.Common/ExtensionFramework/Utilities/LazyExtension.cs index 5a5b1fd02e..5f07f870a5 100644 --- a/src/Microsoft.TestPlatform.Common/ExtensionFramework/Utilities/LazyExtension.cs +++ b/src/Microsoft.TestPlatform.Common/ExtensionFramework/Utilities/LazyExtension.cs @@ -15,18 +15,12 @@ namespace Microsoft.VisualStudio.TestPlatform.Common.ExtensionFramework.Utilitie /// Test extension metadata public class LazyExtension { - #region Private Members - private static readonly object Synclock = new(); private TExtension _extension; private TMetadata _metadata; private readonly Type _metadataType; private readonly Func _extensionCreator; - #endregion - - #region Constructors - /// /// The constructor. /// @@ -80,10 +74,6 @@ public LazyExtension(Func creator!!, TMetadata metadata!!) IsExtensionCreated = false; } - #endregion - - #region Public Properties - /// /// Gets a value indicating whether is extension created. /// @@ -147,5 +137,4 @@ public TMetadata Metadata } } - #endregion } diff --git a/src/Microsoft.TestPlatform.Common/ExtensionFramework/Utilities/TestExtensions.cs b/src/Microsoft.TestPlatform.Common/ExtensionFramework/Utilities/TestExtensions.cs index 25cabd92ee..fb6a7d5698 100644 --- a/src/Microsoft.TestPlatform.Common/ExtensionFramework/Utilities/TestExtensions.cs +++ b/src/Microsoft.TestPlatform.Common/ExtensionFramework/Utilities/TestExtensions.cs @@ -21,8 +21,6 @@ namespace Microsoft.VisualStudio.TestPlatform.Common.ExtensionFramework.Utilitie /// public class TestExtensions { - #region Properties - /// /// Gets or sets test discoverer extensions. /// @@ -93,10 +91,6 @@ public class TestExtensions /// internal bool AreDataCollectorsCached { get; set; } - #endregion - - #region Internal methods - /// /// Adds the extensions specified to the current set of extensions. /// @@ -362,10 +356,6 @@ internal Dictionary GetExtensionsDiscoveredFromAssembly(Dictionary testPluginInfos) where TPluginInfo : TestPluginInformation { Type type = typeof(TPluginInfo); @@ -400,5 +390,4 @@ private void SetTestExtensionCache(Dictionary } } - #endregion } diff --git a/src/Microsoft.TestPlatform.Common/Filtering/Condition.cs b/src/Microsoft.TestPlatform.Common/Filtering/Condition.cs index e880738760..ecb2d78714 100644 --- a/src/Microsoft.TestPlatform.Common/Filtering/Condition.cs +++ b/src/Microsoft.TestPlatform.Common/Filtering/Condition.cs @@ -44,8 +44,6 @@ internal enum Operator /// internal class Condition { - #region Fields - /// /// Default property name which will be used when filter has only property value. /// @@ -82,17 +80,12 @@ internal Operation Operation get; private set; } - #endregion - - #region Constructors internal Condition(string name, Operation operation, string value) { Name = name; Operation = operation; Value = value; } - #endregion - /// /// Evaluate this condition for testObject. diff --git a/src/Microsoft.TestPlatform.Common/Filtering/FilterExpression.cs b/src/Microsoft.TestPlatform.Common/Filtering/FilterExpression.cs index ed2d828538..e421432d68 100644 --- a/src/Microsoft.TestPlatform.Common/Filtering/FilterExpression.cs +++ b/src/Microsoft.TestPlatform.Common/Filtering/FilterExpression.cs @@ -47,8 +47,6 @@ internal class FilterExpression /// private readonly bool _areJoinedByAnd; - #region Constructors - private FilterExpression(FilterExpression left, FilterExpression right, bool areJoinedByAnd) { ValidateArg.NotNull(left, nameof(left)); @@ -64,8 +62,6 @@ private FilterExpression(Condition condition) ValidateArg.NotNull(condition, nameof(condition)); _condition = condition; } - #endregion - /// /// Create a new filter expression 'And'ing 'this' with 'filter'. /// diff --git a/src/Microsoft.TestPlatform.Common/Friends.cs b/src/Microsoft.TestPlatform.Common/Friends.cs index ea3f0a478d..fd476bf868 100644 --- a/src/Microsoft.TestPlatform.Common/Friends.cs +++ b/src/Microsoft.TestPlatform.Common/Friends.cs @@ -3,7 +3,6 @@ using System.Runtime.CompilerServices; -#region Product Assemblies [assembly: InternalsVisibleTo("Microsoft.TestPlatform.CrossPlatEngine, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")] [assembly: InternalsVisibleTo("vstest.console, PublicKey =002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")] [assembly: InternalsVisibleTo("datacollector, PublicKey =002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")] @@ -11,9 +10,6 @@ [assembly: InternalsVisibleTo("Microsoft.VisualStudio.TestPlatform.Common, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")] [assembly: InternalsVisibleTo("Microsoft.VisualStudio.TestPlatform.Client, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")] -#endregion - -#region Test Assemblies [assembly: InternalsVisibleTo("Microsoft.TestPlatform.Common.UnitTests, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")] [assembly: InternalsVisibleTo("Microsoft.TestPlatform.CrossPlatEngine.UnitTests, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")] [assembly: InternalsVisibleTo("vstest.console.UnitTests, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")] @@ -25,4 +21,3 @@ [assembly: InternalsVisibleTo("Microsoft.TestPlatform.Extensions.BlameDataCollector.UnitTests, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")] [assembly: InternalsVisibleTo("Microsoft.TestPlatform.TestUtilities, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")] [assembly: InternalsVisibleTo("Microsoft.TestPlatform.AcceptanceTests, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")] -#endregion diff --git a/src/Microsoft.TestPlatform.Common/Hosting/TestRunTimeProviderManager.cs b/src/Microsoft.TestPlatform.Common/Hosting/TestRunTimeProviderManager.cs index 29c4357b7d..dfbd3db82d 100644 --- a/src/Microsoft.TestPlatform.Common/Hosting/TestRunTimeProviderManager.cs +++ b/src/Microsoft.TestPlatform.Common/Hosting/TestRunTimeProviderManager.cs @@ -16,16 +16,10 @@ namespace Microsoft.VisualStudio.TestPlatform.Common.Hosting; /// public class TestRuntimeProviderManager { - #region Fields - private static TestRuntimeProviderManager s_testHostManager; private readonly TestRuntimeExtensionManager _testHostExtensionManager; - #endregion - - #region Constructor - /// /// Initializes a new instance of the class. /// Default constructor. @@ -44,10 +38,6 @@ protected TestRuntimeProviderManager(IMessageLogger sessionLogger) public static TestRuntimeProviderManager Instance => s_testHostManager ??= new TestRuntimeProviderManager(TestSessionMessageLogger.Instance); - #endregion - - #region Public Methods - public ITestRuntimeProvider GetTestHostManagerByUri(string hostUri) { var host = _testHostExtensionManager.TryGetTestExtension(hostUri); @@ -68,5 +58,4 @@ public virtual ITestRuntimeProvider GetTestHostManagerByRunConfiguration(string return null; } - #endregion } diff --git a/src/Microsoft.TestPlatform.Common/Interfaces/Engine/ClientProtocol/TestExecutionContext.cs b/src/Microsoft.TestPlatform.Common/Interfaces/Engine/ClientProtocol/TestExecutionContext.cs index f9d1a886fe..d8ac227ff5 100644 --- a/src/Microsoft.TestPlatform.Common/Interfaces/Engine/ClientProtocol/TestExecutionContext.cs +++ b/src/Microsoft.TestPlatform.Common/Interfaces/Engine/ClientProtocol/TestExecutionContext.cs @@ -16,8 +16,6 @@ namespace Microsoft.VisualStudio.TestPlatform.ObjectModel.Engine.ClientProtocol; [DataContract] public class TestExecutionContext { - #region Constructors - /// /// Initializes a new instance of the class. /// @@ -66,10 +64,6 @@ public TestExecutionContext( FilterOptions = filterOptions; } - #endregion - - #region Properties - /// /// Gets or sets the frequency of run stats event. /// @@ -183,5 +177,4 @@ public RunConfiguration TestRunConfiguration set; } - #endregion } diff --git a/src/Microsoft.TestPlatform.Common/Logging/InternalTestLoggerEvents.cs b/src/Microsoft.TestPlatform.Common/Logging/InternalTestLoggerEvents.cs index 5a494d2ad6..a0f0ae8b4a 100644 --- a/src/Microsoft.TestPlatform.Common/Logging/InternalTestLoggerEvents.cs +++ b/src/Microsoft.TestPlatform.Common/Logging/InternalTestLoggerEvents.cs @@ -24,8 +24,6 @@ namespace Microsoft.VisualStudio.TestPlatform.Common.Logging; /// internal class InternalTestLoggerEvents : TestLoggerEvents, IDisposable { - #region Fields - /// /// Queue used for events which are to be sent to the loggers. /// @@ -50,10 +48,6 @@ internal class InternalTestLoggerEvents : TestLoggerEvents, IDisposable private readonly bool _isBoundsOnLoggerEventQueueEnabled; private readonly TestSessionMessageLogger _testSessionMessageLogger; - #endregion - - #region Constructor - /// /// Default constructor. /// @@ -79,10 +73,6 @@ public InternalTestLoggerEvents(TestSessionMessageLogger testSessionMessageLogge _testSessionMessageLogger.TestRunMessage += TestRunMessageHandler; } - #endregion - - #region Events - /// /// Raised when a test message is received. /// @@ -123,10 +113,6 @@ public InternalTestLoggerEvents(TestSessionMessageLogger testSessionMessageLogge /// public override event EventHandler DiscoveryComplete; - #endregion - - #region IDisposable - /// /// Waits for all pending messages to be processed by the loggers cleans up. /// @@ -146,10 +132,6 @@ public void Dispose() _loggerEventQueue.Dispose(); } - #endregion - - #region Internal Methods - /// /// Enables sending of events to the loggers which are registered and flushes the queue. /// @@ -320,10 +302,6 @@ internal void CompleteTestRun(ITestRunStatistics stats, bool isCanceled, bool is _loggerEventQueue.Flush(); } - #endregion - - #region Private Members - /// /// Called when a test run message is sent through the ITestRunMessageLogger which is exported. /// @@ -463,5 +441,4 @@ private int GetSetting(string appSettingKey, int defaultValue) return value; } - #endregion } diff --git a/src/Microsoft.TestPlatform.Common/RunSettings.cs b/src/Microsoft.TestPlatform.Common/RunSettings.cs index 550dec271b..a2c7192466 100644 --- a/src/Microsoft.TestPlatform.Common/RunSettings.cs +++ b/src/Microsoft.TestPlatform.Common/RunSettings.cs @@ -28,8 +28,6 @@ namespace Microsoft.VisualStudio.TestPlatform.Common; /// public class RunSettings : IRunSettings { - #region Fields - /// /// Map of the settings names in the file to their associated settings provider. /// @@ -40,8 +38,6 @@ public class RunSettings : IRunSettings /// private bool _isSettingsLoaded; - #endregion - /// /// Initializes a new instance of the class. /// @@ -50,17 +46,11 @@ public RunSettings() _settings = new Dictionary>(); } - #region Properties - /// /// Gets the settings in the form of Xml string. /// public string SettingsXml { get; private set; } - #endregion - - #region Public Methods - /// /// Get the settings for the provided settings name. /// @@ -113,10 +103,6 @@ public void InitializeSettingsProviders(string settings) ReadRunSettings(reader); } - #endregion - - #region Private Methods - /// /// Validate the runsettings checking that it is well formed. /// This would throw XML exception on failure. @@ -265,5 +251,4 @@ private static LazyExtension C metadata); } - #endregion } diff --git a/src/Microsoft.TestPlatform.Common/RunSettingsManager.cs b/src/Microsoft.TestPlatform.Common/RunSettingsManager.cs index 55eba4fe20..d0d2d07aa5 100644 --- a/src/Microsoft.TestPlatform.Common/RunSettingsManager.cs +++ b/src/Microsoft.TestPlatform.Common/RunSettingsManager.cs @@ -14,16 +14,10 @@ namespace Microsoft.VisualStudio.TestPlatform.Common; /// internal class RunSettingsManager : IRunSettingsProvider { - #region private members - private static readonly object LockObject = new(); private static RunSettingsManager s_runSettingsManagerInstance; - #endregion - - #region Constructor - /// /// Default constructor. /// @@ -33,19 +27,11 @@ private RunSettingsManager() } - #endregion - - #region IRunSettingsProvider - /// /// Gets the active run settings. /// public RunSettings ActiveRunSettings { get; private set; } - #endregion - - #region Public Methods - public static RunSettingsManager Instance { get @@ -81,5 +67,4 @@ public void SetActiveRunSettings(RunSettings runSettings) ActiveRunSettings = runSettings; } - #endregion } diff --git a/src/Microsoft.TestPlatform.Common/SettingsProvider/SettingsProviderExtensionManager.cs b/src/Microsoft.TestPlatform.Common/SettingsProvider/SettingsProviderExtensionManager.cs index ecf599f902..809b84936a 100644 --- a/src/Microsoft.TestPlatform.Common/SettingsProvider/SettingsProviderExtensionManager.cs +++ b/src/Microsoft.TestPlatform.Common/SettingsProvider/SettingsProviderExtensionManager.cs @@ -29,7 +29,6 @@ namespace Microsoft.VisualStudio.TestPlatform.Common.SettingsProvider; /// public class SettingsProviderExtensionManager { - #region Fields private static SettingsProviderExtensionManager s_settingsProviderExtensionManager; private static readonly object Synclock = new(); @@ -43,10 +42,6 @@ public class SettingsProviderExtensionManager /// private readonly IMessageLogger _logger; - #endregion - - #region Constructor - /// /// Initializes with the settings providers. /// @@ -88,10 +83,6 @@ protected SettingsProviderExtensionManager( } } - #endregion - - #region Properties - /// /// Gets the Unfiltered list of settings providers. Used for the /ListSettingsProviders command line argument. /// @@ -102,10 +93,6 @@ protected SettingsProviderExtensionManager( /// public Dictionary> SettingsProvidersMap { get; } - #endregion - - #region Static Methods - /// /// Creates an instance of the settings provider. /// @@ -173,10 +160,6 @@ public static void LoadAndInitializeAllExtensions(bool shouldThrowOnError) } } - #endregion - - #region Public Methods - /// /// Gets the settings with the provided name. /// @@ -194,7 +177,6 @@ internal LazyExtension GetSett return settingsProvider; } - #endregion } /// diff --git a/src/Microsoft.TestPlatform.CommunicationUtilities/Messages/MessageType.cs b/src/Microsoft.TestPlatform.CommunicationUtilities/Messages/MessageType.cs index 1d69e7f269..9be83052a1 100644 --- a/src/Microsoft.TestPlatform.CommunicationUtilities/Messages/MessageType.cs +++ b/src/Microsoft.TestPlatform.CommunicationUtilities/Messages/MessageType.cs @@ -215,8 +215,6 @@ public static class MessageType /// public const string StopTestSessionCallback = "TestSession.StopTestSessionCallback"; - #region DataCollector messages - /// /// Event message type sent to datacollector process right after test host process has started. /// @@ -262,5 +260,4 @@ public static class MessageType /// public const string DataCollectionTestStartAck = "DataCollection.TestStartAck"; - #endregion } diff --git a/src/Microsoft.TestPlatform.CommunicationUtilities/SocketCommunicationManager.cs b/src/Microsoft.TestPlatform.CommunicationUtilities/SocketCommunicationManager.cs index 4a66d4f39f..67432548bb 100644 --- a/src/Microsoft.TestPlatform.CommunicationUtilities/SocketCommunicationManager.cs +++ b/src/Microsoft.TestPlatform.CommunicationUtilities/SocketCommunicationManager.cs @@ -89,8 +89,6 @@ internal SocketCommunicationManager(IDataSerializer dataSerializer) _dataSerializer = dataSerializer; } - #region ServerMethods - /// /// Host TCP Socket Server and start listening /// @@ -156,10 +154,6 @@ public void StopServer() _binaryWriter?.Dispose(); } - #endregion - - #region ClientMethods - /// /// Connects to server async /// @@ -239,8 +233,6 @@ public void StopClient() _binaryWriter?.Dispose(); } - #endregion - /// /// Writes message to the binary writer. /// diff --git a/src/Microsoft.TestPlatform.CommunicationUtilities/TestRequestSender.cs b/src/Microsoft.TestPlatform.CommunicationUtilities/TestRequestSender.cs index 142ebfb97d..5a956881ea 100644 --- a/src/Microsoft.TestPlatform.CommunicationUtilities/TestRequestSender.cs +++ b/src/Microsoft.TestPlatform.CommunicationUtilities/TestRequestSender.cs @@ -244,8 +244,6 @@ public void CheckVersionWithTestHost() } } - #region Discovery Protocol - /// public void InitializeDiscovery(IEnumerable pathToAdditionalExtensions) { @@ -276,10 +274,6 @@ public void DiscoverTests(DiscoveryCriteria discoveryCriteria, ITestDiscoveryEve _channel.Send(message); } - #endregion - - #region Execution Protocol - /// public void InitializeExecution(IEnumerable pathToAdditionalExtensions) { @@ -407,8 +401,6 @@ public void SendTestRunAbort() _channel?.Send(_dataSerializer.SerializeMessage(MessageType.AbortTestRun)); } - #endregion - /// public void EndSession() { diff --git a/src/Microsoft.TestPlatform.CoreUtilities/Utilities/Job.cs b/src/Microsoft.TestPlatform.CoreUtilities/Utilities/Job.cs index e29b053e8d..be154a7800 100644 --- a/src/Microsoft.TestPlatform.CoreUtilities/Utilities/Job.cs +++ b/src/Microsoft.TestPlatform.CoreUtilities/Utilities/Job.cs @@ -17,8 +17,6 @@ namespace Microsoft.VisualStudio.TestPlatform.Common.Utilities; /// The type of the job. internal class Job { - #region Constructor - /// /// Initializes a new instance of the class. /// @@ -42,10 +40,6 @@ private Job() Size = 0; } - #endregion - - #region Properties - /// /// Gets a special job that indicates the queue should shutdown. /// @@ -80,10 +74,6 @@ public static Job ShutdownJob /// public int Size { get; private set; } - #endregion - - #region Static Methods - /// /// Creates a job with a manual reset event that will be set when the job is processed. /// @@ -98,5 +88,4 @@ public static Job CreateWaitJob(ManualResetEvent waitEvent) return waitJob; } - #endregion } diff --git a/src/Microsoft.TestPlatform.CoreUtilities/Utilities/JobQueue.cs b/src/Microsoft.TestPlatform.CoreUtilities/Utilities/JobQueue.cs index ace90a0e10..87e0d9ccc5 100644 --- a/src/Microsoft.TestPlatform.CoreUtilities/Utilities/JobQueue.cs +++ b/src/Microsoft.TestPlatform.CoreUtilities/Utilities/JobQueue.cs @@ -24,8 +24,6 @@ namespace Microsoft.VisualStudio.TestPlatform.Utilities; /// The type of the job that is being processed. public class JobQueue : IDisposable { - #region Fields - /// /// Handler which processes the individual jobs. /// @@ -88,10 +86,6 @@ public class JobQueue : IDisposable /// private readonly Action _exceptionLogger; - #endregion - - #region Constructor - /// /// Initializes a new instance of the class. /// @@ -140,10 +134,6 @@ public JobQueue(Action processJob!!, string displayName, int maxQueueLength, _backgroundJobProcessor.Start(); } - #endregion - - #region Methods - /// /// Adds a job to the queue. /// @@ -235,10 +225,6 @@ public void Dispose() _queueProcessing.Dispose(); } - #endregion - - #region Private Methods - /// /// Block the queue call. /// A separate protected virtual method had to be made so that it can be over-ridden when writing unit test to check @@ -369,5 +355,4 @@ private void SafeProcessJob(T job) } } - #endregion } diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/Client/Parallel/ParallelDiscoveryDataAggregator.cs b/src/Microsoft.TestPlatform.CrossPlatEngine/Client/Parallel/ParallelDiscoveryDataAggregator.cs index 1ba27fe4d1..e68a4a47db 100644 --- a/src/Microsoft.TestPlatform.CrossPlatEngine/Client/Parallel/ParallelDiscoveryDataAggregator.cs +++ b/src/Microsoft.TestPlatform.CrossPlatEngine/Client/Parallel/ParallelDiscoveryDataAggregator.cs @@ -17,13 +17,9 @@ namespace Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.Parallel; /// internal class ParallelDiscoveryDataAggregator { - #region PrivateFields - private readonly object _dataUpdateSyncObject = new(); private readonly ConcurrentDictionary _metricsAggregator; - #endregion - public ParallelDiscoveryDataAggregator() { IsAborted = false; @@ -31,8 +27,6 @@ public ParallelDiscoveryDataAggregator() _metricsAggregator = new ConcurrentDictionary(); } - #region Public Properties - /// /// Set to true if any of the request is aborted /// @@ -43,10 +37,6 @@ public ParallelDiscoveryDataAggregator() /// public long TotalTests { get; private set; } - #endregion - - #region Public Methods - /// /// Returns the Aggregated Metrics. /// @@ -130,5 +120,4 @@ public void AggregateDiscoveryDataMetrics(IDictionary metrics) } } - #endregion } diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/Client/Parallel/ParallelOperationManager.cs b/src/Microsoft.TestPlatform.CrossPlatEngine/Client/Parallel/ParallelOperationManager.cs index d4f3b23b47..fecfca23b0 100644 --- a/src/Microsoft.TestPlatform.CrossPlatEngine/Client/Parallel/ParallelOperationManager.cs +++ b/src/Microsoft.TestPlatform.CrossPlatEngine/Client/Parallel/ParallelOperationManager.cs @@ -20,8 +20,6 @@ namespace Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client; /// internal abstract class ParallelOperationManager : IParallelOperationManager, IDisposable { - #region ConcurrentManagerInstanceData - protected Func CreateNewConcurrentManager { get; set; } /// @@ -41,18 +39,12 @@ internal abstract class ParallelOperationManager : IParallelOperationMana /// private int _currentParallelLevel; - #endregion - - #region Concurrency Keeper Objects - /// /// LockObject to iterate our sourceEnumerator in parallel /// We can use the sourceEnumerator itself as lockObject, but since its a changing object - it's risky to use it as one /// protected object _sourceEnumeratorLockObject = new(); - #endregion - protected ParallelOperationManager(Func createNewManager, int parallelLevel, bool sharedHosts) { CreateNewConcurrentManager = createNewManager; diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/Client/Parallel/ParallelProxyDiscoveryManager.cs b/src/Microsoft.TestPlatform.CrossPlatEngine/Client/Parallel/ParallelProxyDiscoveryManager.cs index 7ad7a42ed0..ed8601657b 100644 --- a/src/Microsoft.TestPlatform.CrossPlatEngine/Client/Parallel/ParallelProxyDiscoveryManager.cs +++ b/src/Microsoft.TestPlatform.CrossPlatEngine/Client/Parallel/ParallelProxyDiscoveryManager.cs @@ -25,8 +25,6 @@ internal class ParallelProxyDiscoveryManager : ParallelOperationManager /// LockObject to update discovery status in parallel /// private readonly object _discoveryStatusLockObject = new(); - #endregion - public ParallelProxyDiscoveryManager(IRequestData requestData, Func actualProxyManagerCreator, int parallelLevel, bool sharedHosts) : this(requestData, actualProxyManagerCreator, JsonDataSerializer.Instance, parallelLevel, sharedHosts) { @@ -66,8 +58,6 @@ internal ParallelProxyDiscoveryManager(IRequestData requestData, Func public void Initialize(bool skipDefaultAdapters) { @@ -101,10 +91,6 @@ public void Close() DoActionOnAllManagers(proxyManager => proxyManager.Close(), doActionsInParallel: true); } - #endregion - - #region IParallelProxyDiscoveryManager methods - /// public bool HandlePartialDiscoveryComplete(IProxyDiscoveryManager proxyDiscoveryManager, long totalTests, IEnumerable lastChunk, bool isAborted) { @@ -166,8 +152,6 @@ Now when both.net framework and.net core projects can run in parallel return false; } - #endregion - private void DiscoverTestsPrivate(ITestDiscoveryEventsHandler2 discoveryEventsHandler) { _currentDiscoveryEventsHandler = discoveryEventsHandler; diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/Client/Parallel/ParallelProxyExecutionManager.cs b/src/Microsoft.TestPlatform.CrossPlatEngine/Client/Parallel/ParallelProxyExecutionManager.cs index 641d5cfcef..bfb1945000 100644 --- a/src/Microsoft.TestPlatform.CrossPlatEngine/Client/Parallel/ParallelProxyExecutionManager.cs +++ b/src/Microsoft.TestPlatform.CrossPlatEngine/Client/Parallel/ParallelProxyExecutionManager.cs @@ -31,8 +31,6 @@ internal class ParallelProxyExecutionManager : ParallelOperationManager public bool IsInitialized { get; private set; } - #endregion - - #region Concurrency Keeper Objects - /// /// LockObject to update execution status in parallel /// private readonly object _executionStatusLockObject = new(); - #endregion - public ParallelProxyExecutionManager(IRequestData requestData, Func actualProxyManagerCreator, int parallelLevel) : this(requestData, actualProxyManagerCreator, JsonDataSerializer.Instance, parallelLevel, true) { @@ -86,8 +78,6 @@ internal ParallelProxyExecutionManager(IRequestData requestData, Func proxyManager.Close(), doActionsInParallel: true); } - #endregion - - #region IParallelProxyExecutionManager methods - /// /// Handles Partial Run Complete event coming from a specific concurrent proxy execution manager /// Each concurrent proxy execution manager will signal the parallel execution manager when its complete @@ -221,8 +207,6 @@ public bool HandlePartialRunComplete( return false; } - #endregion - private int StartTestRunPrivate(ITestRunEventsHandler runEventsHandler) { _currentRunEventsHandler = runEventsHandler; diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/Client/Parallel/ParallelRunDataAggregator.cs b/src/Microsoft.TestPlatform.CrossPlatEngine/Client/Parallel/ParallelRunDataAggregator.cs index 9709f2a9da..960afeb051 100644 --- a/src/Microsoft.TestPlatform.CrossPlatEngine/Client/Parallel/ParallelRunDataAggregator.cs +++ b/src/Microsoft.TestPlatform.CrossPlatEngine/Client/Parallel/ParallelRunDataAggregator.cs @@ -20,8 +20,6 @@ namespace Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.Parallel; /// internal class ParallelRunDataAggregator { - #region PrivateFields - private readonly List _executorUris; @@ -31,8 +29,6 @@ internal class ParallelRunDataAggregator private readonly object _dataUpdateSyncObject = new(); - #endregion - public ParallelRunDataAggregator(string runSettingsXml!!) { RunSettings = runSettingsXml; @@ -50,8 +46,6 @@ public ParallelRunDataAggregator(string runSettingsXml!!) IsCanceled = false; } - #region Public Properties - public TimeSpan ElapsedTime { get; set; } public Collection RunContextAttachments { get; set; } @@ -70,10 +64,6 @@ public ParallelRunDataAggregator(string runSettingsXml!!) public string RunSettings { get; } - #endregion - - #region Public Methods - public ITestRunStatistics GetAggregatedRunStats() { var testOutcomeMap = new Dictionary(); @@ -209,5 +199,4 @@ public void AggregateRunDataMetrics(IDictionary metrics) } } - #endregion } diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/Client/ProxyDiscoveryManager.cs b/src/Microsoft.TestPlatform.CrossPlatEngine/Client/ProxyDiscoveryManager.cs index 7bd2eb456e..4ebe49cf0b 100644 --- a/src/Microsoft.TestPlatform.CrossPlatEngine/Client/ProxyDiscoveryManager.cs +++ b/src/Microsoft.TestPlatform.CrossPlatEngine/Client/ProxyDiscoveryManager.cs @@ -41,8 +41,6 @@ public class ProxyDiscoveryManager : IProxyDiscoveryManager, IBaseProxy, ITestDi private ITestDiscoveryEventsHandler2 _baseTestDiscoveryEventsHandler; private bool _skipDefaultAdapters; - #region Constructors - /// /// Initializes a new instance of the class. /// @@ -118,10 +116,6 @@ internal ProxyDiscoveryManager( _proxyOperationManager = new ProxyOperationManager(requestData, requestSender, testHostManager, this); } - #endregion - - #region IProxyDiscoveryManager implementation. - /// public void Initialize(bool skipDefaultAdapters) { @@ -251,9 +245,6 @@ public void HandleLogMessage(TestMessageLevel level, string message) _baseTestDiscoveryEventsHandler.HandleLogMessage(level, message); } - #endregion - - #region IBaseProxy implementation. /// public virtual TestProcessStartInfo UpdateTestProcessStartInfo(TestProcessStartInfo testProcessStartInfo) { @@ -262,8 +253,6 @@ public virtual TestProcessStartInfo UpdateTestProcessStartInfo(TestProcessStartI testProcessStartInfo.Arguments += " --telemetryoptedin " + telemetryOptedIn; return testProcessStartInfo; } - #endregion - private void InitializeExtensions(IEnumerable sources) { var extensions = TestPluginCache.Instance.GetExtensionPaths(TestPlatformConstants.TestAdapterEndsWithPattern, _skipDefaultAdapters); diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/Client/ProxyExecutionManager.cs b/src/Microsoft.TestPlatform.CrossPlatEngine/Client/ProxyExecutionManager.cs index 9dfcb1d899..09facbdb53 100644 --- a/src/Microsoft.TestPlatform.CrossPlatEngine/Client/ProxyExecutionManager.cs +++ b/src/Microsoft.TestPlatform.CrossPlatEngine/Client/ProxyExecutionManager.cs @@ -58,8 +58,6 @@ public CancellationTokenSource CancellationTokenSource get { return _proxyOperationManager.CancellationTokenSource; } set { _proxyOperationManager.CancellationTokenSource = value; } } - #region Constructors - /// /// Initializes a new instance of the class. /// @@ -138,10 +136,6 @@ internal ProxyExecutionManager( _proxyOperationManager = new ProxyOperationManager(requestData, requestSender, testHostManager, this); } - #endregion - - #region IProxyExecutionManager implementation. - /// public virtual void Initialize(bool skipDefaultAdapters) { @@ -378,9 +372,6 @@ public void HandleLogMessage(TestMessageLevel level, string message) _baseTestRunEventsHandler.HandleLogMessage(level, message); } - #endregion - - #region IBaseProxy implementation. /// public virtual TestProcessStartInfo UpdateTestProcessStartInfo(TestProcessStartInfo testProcessStartInfo) { @@ -389,8 +380,6 @@ public virtual TestProcessStartInfo UpdateTestProcessStartInfo(TestProcessStartI testProcessStartInfo.Arguments += " --telemetryoptedin " + telemetryOptedIn; return testProcessStartInfo; } - #endregion - /// /// Ensures that the engine is ready for test operations. Usually includes starting up the /// test host process. diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/Client/ProxyOperationManager.cs b/src/Microsoft.TestPlatform.CrossPlatEngine/Client/ProxyOperationManager.cs index fef4827c89..8cccb4bba7 100644 --- a/src/Microsoft.TestPlatform.CrossPlatEngine/Client/ProxyOperationManager.cs +++ b/src/Microsoft.TestPlatform.CrossPlatEngine/Client/ProxyOperationManager.cs @@ -49,7 +49,6 @@ public class ProxyOperationManager private int _testHostProcessId; private string _testHostProcessStdError; - #region Constructors /// /// Initializes a new instance of the class. /// @@ -94,9 +93,6 @@ public ProxyOperationManager( CancellationTokenSource = new CancellationTokenSource(); } - #endregion - - #region Properties /// /// Gets or sets the request data. /// @@ -121,9 +117,6 @@ public ProxyOperationManager( /// Gets or sets the cancellation token source. /// public CancellationTokenSource CancellationTokenSource { get; set; } - #endregion - - #region IProxyOperationManager implementation. /// /// Initializes the proxy. /// @@ -337,8 +330,6 @@ public virtual void Close() } } - #endregion - /// /// This method is exposed to enable derived classes to modify /// . For example, data collectors need additional diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/Client/TestLoggerManager.cs b/src/Microsoft.TestPlatform.CrossPlatEngine/Client/TestLoggerManager.cs index dc81b756e2..1926950127 100644 --- a/src/Microsoft.TestPlatform.CrossPlatEngine/Client/TestLoggerManager.cs +++ b/src/Microsoft.TestPlatform.CrossPlatEngine/Client/TestLoggerManager.cs @@ -33,8 +33,6 @@ namespace Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client; /// internal class TestLoggerManager : ITestLoggerManager { - #region FieldsLog - /// /// Keeps track if we are disposed. /// @@ -85,10 +83,6 @@ internal class TestLoggerManager : ITestLoggerManager /// private readonly IAssemblyLoadContext _assemblyLoadContext; - #endregion - - #region Constructor - /// /// Test logger manager. /// @@ -116,10 +110,6 @@ internal TestLoggerManager(IRequestData requestData, IMessageLogger messageLogge _assemblyLoadContext = assemblyLoadContext; } - #endregion - - #region Properties - /// /// Loggers initialized flag. /// @@ -138,10 +128,6 @@ private TestLoggerExtensionManager TestLoggerExtensionManager } } - #endregion - - #region Public Methods - /// /// Initializes all the loggers passed by user /// @@ -363,8 +349,6 @@ public void Dispose() GC.SuppressFinalize(this); } - #endregion - /// /// Initializes logger with the specified URI and parameters. /// For ex. TfsPublisher takes parameters such as Platform, Flavor etc. diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/DataCollection/InProcDataCollector.cs b/src/Microsoft.TestPlatform.CrossPlatEngine/DataCollection/InProcDataCollector.cs index 694312ebb2..2d0878516f 100644 --- a/src/Microsoft.TestPlatform.CrossPlatEngine/DataCollection/InProcDataCollector.cs +++ b/src/Microsoft.TestPlatform.CrossPlatEngine/DataCollection/InProcDataCollector.cs @@ -129,8 +129,6 @@ public void TriggerInProcDataCollectionMethod(string methodName, InProcDataColle } } - #region Private Methods - private void InitializeDataCollector(object obj, IDataCollectionSink inProcDataCollectionSink) { var initializeMethodInfo = GetMethodInfoFromType(obj.GetType(), "Initialize", new Type[] { typeof(IDataCollectionSink) }); @@ -170,5 +168,4 @@ private Assembly LoadInProcDataCollectorExtension(string codeBase) return assembly; } - #endregion } diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/Discovery/DiscoveryResultCache.cs b/src/Microsoft.TestPlatform.CrossPlatEngine/Discovery/DiscoveryResultCache.cs index 3689714816..2ff69c73ae 100644 --- a/src/Microsoft.TestPlatform.CrossPlatEngine/Discovery/DiscoveryResultCache.cs +++ b/src/Microsoft.TestPlatform.CrossPlatEngine/Discovery/DiscoveryResultCache.cs @@ -16,8 +16,6 @@ namespace Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Discovery; /// internal class DiscoveryResultCache { - #region private members - /// /// Callback used when cache is full. /// @@ -48,8 +46,6 @@ internal class DiscoveryResultCache /// private readonly object _syncObject = new(); - #endregion - /// /// Initializes a new instance of the class. /// diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/Execution/BaseRunTests.cs b/src/Microsoft.TestPlatform.CrossPlatEngine/Execution/BaseRunTests.cs index 686fa7ffe4..b28efbf4b8 100644 --- a/src/Microsoft.TestPlatform.CrossPlatEngine/Execution/BaseRunTests.cs +++ b/src/Microsoft.TestPlatform.CrossPlatEngine/Execution/BaseRunTests.cs @@ -43,8 +43,6 @@ namespace Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Execution; /// internal abstract class BaseRunTests { - #region private fields - private readonly ITestEventsPublisher _testEventsPublisher; private protected string _package; private readonly IRequestData _requestData; @@ -76,10 +74,6 @@ internal abstract class BaseRunTests /// private readonly IDataSerializer _dataSerializer; - #endregion - - #region Constructor - /// /// Initializes a new instance of the class. /// @@ -174,10 +168,6 @@ protected BaseRunTests( ExecutorUrisThatRanTests = new List(); } - #endregion - - #region Properties - /// /// Gets the run settings. /// @@ -206,10 +196,6 @@ protected BaseRunTests( protected ICollection ExecutorUrisThatRanTests { get; } - #endregion - - #region Public methods - public void RunTests() { using (TestRunCache) @@ -287,8 +273,6 @@ internal void Cancel() } } - #region Abstract methods - protected abstract void BeforeRaisingTestRunComplete(bool exceptionsHitDuringRunTests); protected abstract IEnumerable> GetExecutorUriExtensionMap( @@ -320,8 +304,6 @@ protected abstract bool ShouldAttachDebuggerToTestHost( protected abstract void SendSessionEnd(); - #endregion - private void CancelTestRunInternal(ITestExecutor executor) { try @@ -333,10 +315,6 @@ private void CancelTestRunInternal(ITestExecutor executor) EqtTrace.Info("{0}.Cancel threw an exception: {1} ", executor.GetType().FullName, e); } } - #endregion - - #region Private methods - private void OnTestRunMessage(object sender, TestRunMessageEventArgs e) { TestRunEventsHandler.HandleLogMessage(e.Level, e.Message); @@ -739,5 +717,4 @@ private ICollection UpdateInProgressTests(ICollection inProg return updatedTestCases; } - #endregion } diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/Execution/ExecutionManager.cs b/src/Microsoft.TestPlatform.CrossPlatEngine/Execution/ExecutionManager.cs index e973f314e9..f09f68d786 100644 --- a/src/Microsoft.TestPlatform.CrossPlatEngine/Execution/ExecutionManager.cs +++ b/src/Microsoft.TestPlatform.CrossPlatEngine/Execution/ExecutionManager.cs @@ -56,8 +56,6 @@ protected ExecutionManager(ITestPlatformEventSource testPlatformEventSource, IRe _requestData = requestData; } - #region IExecutionManager Implementation - /// /// Initializes the execution manager. /// @@ -185,10 +183,6 @@ public void Abort(ITestRunEventsHandler testRunEventsHandler) } } - #endregion - - #region private methods - private void LoadExtensions() { try @@ -243,5 +237,4 @@ private void TestSessionMessageHandler(object sender, TestRunMessageEventArgs e) } } - #endregion } diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/Execution/TestRunCache.cs b/src/Microsoft.TestPlatform.CrossPlatEngine/Execution/TestRunCache.cs index 1d4e62484d..b70c2b5ca0 100644 --- a/src/Microsoft.TestPlatform.CrossPlatEngine/Execution/TestRunCache.cs +++ b/src/Microsoft.TestPlatform.CrossPlatEngine/Execution/TestRunCache.cs @@ -21,8 +21,6 @@ namespace Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Execution; /// internal class TestRunCache : ITestRunCache { - #region Private Members - /// /// Specifies whether the object is disposed or not. /// @@ -78,10 +76,6 @@ internal class TestRunCache : ITestRunCache /// private readonly object _syncObject; - #endregion - - #region Constructor - /// /// Initializes a new instance of the class. /// @@ -111,19 +105,11 @@ internal TestRunCache(long cacheSize, TimeSpan cacheTimeout, OnCacheHit onCacheH _timer = new Timer(OnCacheTimeHit, this, cacheTimeout, cacheTimeout); } - #endregion - - #region Delegates - /// /// Called when the cache is ready to report on the current status. /// internal delegate void OnCacheHit(TestRunStatistics testRunStats, ICollection results, ICollection inProgressTests); - #endregion - - #region Properties - /// /// Gets the test results present in the cache currently. /// @@ -184,10 +170,6 @@ public TestRunStatistics TestRunStatistics } public IDictionary AdapterTelemetry { get; set; } = new Dictionary(); - #endregion - - #region Public/internal methods - /// /// Disposes the cache /// @@ -325,10 +307,6 @@ protected virtual void Dispose(bool disposing) } } - #endregion - - #region Private methods. - /// /// Checks if the cache timeout/size has been met. /// @@ -398,5 +376,4 @@ private void RemoveInProgress(TestResult result) } } - #endregion } diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/Interfaces/ITestRunCache.cs b/src/Microsoft.TestPlatform.CrossPlatEngine/Interfaces/ITestRunCache.cs index 586c71e217..521f5563f3 100644 --- a/src/Microsoft.TestPlatform.CrossPlatEngine/Interfaces/ITestRunCache.cs +++ b/src/Microsoft.TestPlatform.CrossPlatEngine/Interfaces/ITestRunCache.cs @@ -16,8 +16,6 @@ namespace Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Execution; /// internal interface ITestRunCache : IDisposable { - #region Properties - ICollection TestResults { get; } ICollection InProgressTests { get; } @@ -27,10 +25,6 @@ internal interface ITestRunCache : IDisposable IDictionary AdapterTelemetry { get; } - #endregion - - #region Methods - void OnTestStarted(TestCase testCase); void OnNewTestResult(TestResult testResult); @@ -39,5 +33,4 @@ internal interface ITestRunCache : IDisposable ICollection GetLastChunk(); - #endregion } diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/TestEngine.cs b/src/Microsoft.TestPlatform.CrossPlatEngine/TestEngine.cs index ee165b908d..89ecdd89ea 100644 --- a/src/Microsoft.TestPlatform.CrossPlatEngine/TestEngine.cs +++ b/src/Microsoft.TestPlatform.CrossPlatEngine/TestEngine.cs @@ -34,14 +34,10 @@ namespace Microsoft.VisualStudio.TestPlatform.CrossPlatEngine; /// public class TestEngine : ITestEngine { - #region Private Fields - private readonly TestRuntimeProviderManager _testHostProviderManager; private ITestExtensionManager _testExtensionManager; private readonly IProcessHelper _processHelper; - #endregion - public TestEngine() : this(TestRuntimeProviderManager.Instance, new ProcessHelper()) { } @@ -54,8 +50,6 @@ protected TestEngine( _processHelper = processHelper; } - #region ITestEngine implementation - /// public IProxyDiscoveryManager GetDiscoveryManager( IRequestData requestData, @@ -365,8 +359,6 @@ public ITestLoggerManager GetLoggerManager(IRequestData requestData) new InternalTestLoggerEvents(TestSessionMessageLogger.Instance)); } - #endregion - private static int GetDistinctNumberOfSources(TestRunCriteria testRunCriteria) { // No point in creating more processes if number of sources is less than what the user diff --git a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/BlameLogger.cs b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/BlameLogger.cs index 2703b9282f..73c24fd635 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/BlameLogger.cs +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/BlameLogger.cs @@ -21,8 +21,6 @@ namespace Microsoft.TestPlatform.Extensions.BlameDataCollector; [ExtensionUri(ExtensionUri)] public class BlameLogger : ITestLogger { - #region Constants - /// /// Uri used to uniquely identify the Blame logger. /// @@ -43,10 +41,6 @@ public class BlameLogger : ITestLogger /// private readonly IOutput _output; - #endregion - - #region Constructor - /// /// Initializes a new instance of the class. /// @@ -67,10 +61,6 @@ protected BlameLogger(IOutput output, IBlameReaderWriter blameReaderWriter) _blameReaderWriter = blameReaderWriter; } - #endregion - - #region ITestLogger - /// /// Initializes the Logger. /// @@ -114,10 +104,6 @@ private void TestRunCompleteHandler(object sender!!, TestRunCompleteEventArgs e) _output.Error(false, Resources.Resources.AbortedTestRun, sb.ToString()); } - #endregion - - #region Faulty test case fetch - /// /// Fetches faulty test case /// @@ -153,5 +139,4 @@ private IEnumerable GetFaultyTestCaseNames(TestRunCompleteEventArgs e) return faultyTestCaseNames; } - #endregion } diff --git a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/BlameTestObject.cs b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/BlameTestObject.cs index d615cbce50..2cdece6c27 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/BlameTestObject.cs +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/BlameTestObject.cs @@ -11,8 +11,6 @@ namespace Microsoft.TestPlatform.Extensions.BlameDataCollector; public class BlameTestObject { - #region Constructor - /// /// Initializes a new instance of the class. /// @@ -62,10 +60,6 @@ public BlameTestObject(TestCase testCase) IsCompleted = false; } - #endregion - - #region Properties - /// /// Gets or sets the id of the test case. /// @@ -96,5 +90,4 @@ public BlameTestObject(TestCase testCase) /// public string DisplayName { get; set; } - #endregion } diff --git a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/XmlReaderWriter.cs b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/XmlReaderWriter.cs index e28f623155..969d55a9de 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/XmlReaderWriter.cs +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/XmlReaderWriter.cs @@ -24,8 +24,6 @@ public class XmlReaderWriter : IBlameReaderWriter /// private readonly IFileHelper _fileHelper; - #region Constructor - /// /// Initializes a new instance of the class. /// @@ -46,8 +44,6 @@ protected XmlReaderWriter(IFileHelper fileHelper) _fileHelper = fileHelper; } - #endregion - /// /// Writes test Sequence to file. /// Protected for testing purposes diff --git a/src/Microsoft.TestPlatform.Extensions.HtmlLogger/Friends.cs b/src/Microsoft.TestPlatform.Extensions.HtmlLogger/Friends.cs index 6b0b46c20b..ead6ee8c3a 100644 --- a/src/Microsoft.TestPlatform.Extensions.HtmlLogger/Friends.cs +++ b/src/Microsoft.TestPlatform.Extensions.HtmlLogger/Friends.cs @@ -3,8 +3,5 @@ using System.Runtime.CompilerServices; -#region Test Assemblies - [assembly: InternalsVisibleTo("Microsoft.TestPlatform.Extensions.HtmlLogger.UnitTests, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")] -#endregion diff --git a/src/Microsoft.TestPlatform.Extensions.TrxLogger/Friends.cs b/src/Microsoft.TestPlatform.Extensions.TrxLogger/Friends.cs index a0a0c719df..30a5704544 100644 --- a/src/Microsoft.TestPlatform.Extensions.TrxLogger/Friends.cs +++ b/src/Microsoft.TestPlatform.Extensions.TrxLogger/Friends.cs @@ -3,8 +3,5 @@ using System.Runtime.CompilerServices; -#region Test Assemblies - [assembly: InternalsVisibleTo("Microsoft.TestPlatform.Extensions.TrxLogger.UnitTests, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")] -#endregion diff --git a/src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/CollectorDataEntry.cs b/src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/CollectorDataEntry.cs index f142ff2e58..9203762cbf 100644 --- a/src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/CollectorDataEntry.cs +++ b/src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/CollectorDataEntry.cs @@ -21,8 +21,6 @@ namespace Microsoft.TestPlatform.Extensions.TrxLogger.ObjectModel; /// internal class CollectorDataEntry : IXmlTestStore { - #region Private Fields - /// /// List of data attachments. These attachments can be things such as files that the /// collector wants to make available to the publishers. @@ -54,10 +52,6 @@ internal class CollectorDataEntry : IXmlTestStore /// private string _collectorDisplayName; - #endregion - - #region Constructor - /// /// Used by the aggregator to put collector Uri, agentName, string agentDisplayName, whether it's remote data, and /// Attachments. @@ -129,10 +123,6 @@ private CollectorDataEntry(CollectorDataEntry other, string resultsDirectory, bo } } - #endregion - - #region Public Properties - /// /// Gets the read-only list of data attachments /// @@ -144,10 +134,6 @@ public IList Attachments } } - #endregion - - #region IXmlTestStore Members - /// /// Saves the state to the XML element /// @@ -176,10 +162,6 @@ public void Save(XmlElement element, XmlTestStoreParameters parameters) helper.SaveIEnumerable(uriAttachments, element, "UriAttachments", "A", "UriAttachment", parameters); } - #endregion - - #region Internal Methods - /// /// Adds a data attachment to the list of data attachments /// @@ -203,10 +185,6 @@ internal CollectorDataEntry Clone(string resultsDirectory, bool useAbsolutePaths return new CollectorDataEntry(this, resultsDirectory, useAbsolutePaths); } - #endregion - - #region Private Methods - private void Initialize(Uri uri, string collectorDisplayName, string agentName, string agentDisplayName, bool isFromRemoteAgent, IEnumerable attachments) { EqtAssert.ParameterNotNull(uri, nameof(uri)); @@ -231,5 +209,4 @@ private void Initialize(Uri uri, string collectorDisplayName, string agentName, _isFromRemoteAgent = isFromRemoteAgent; } - #endregion } diff --git a/src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/RunInfo.cs b/src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/RunInfo.cs index e781481c68..5b50820d40 100644 --- a/src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/RunInfo.cs +++ b/src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/RunInfo.cs @@ -16,8 +16,6 @@ namespace Microsoft.TestPlatform.Extensions.TrxLogger.ObjectModel; /// internal sealed class RunInfo : IXmlTestStore { - #region Fields - [StoreXmlSimpleField("Text", "")] private readonly string _text; @@ -32,10 +30,6 @@ internal sealed class RunInfo : IXmlTestStore [StoreXmlSimpleField("@timestamp")] private readonly DateTime _timestamp; - #endregion - - #region Constructors - /// /// Initializes a new instance of the class. /// @@ -62,10 +56,6 @@ public RunInfo(string textMessage, Exception ex, string computer, TestOutcome ou _timestamp = DateTime.UtcNow; } - #endregion - - #region IXmlTestStore Members - /// /// Saves the class under the XmlElement.. /// @@ -82,5 +72,4 @@ public void Save(XmlElement element, XmlTestStoreParameters parameters) helper.SaveSimpleField(element, "Exception", _exception, null); } - #endregion } diff --git a/src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/TestCategoryItems.cs b/src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/TestCategoryItems.cs index bd37694fe5..03bd155bc8 100644 --- a/src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/TestCategoryItems.cs +++ b/src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/TestCategoryItems.cs @@ -13,19 +13,14 @@ namespace Microsoft.TestPlatform.Extensions.TrxLogger.ObjectModel; using XML; -#region TestCategoryItem /// /// Stores a string which categorizes the Test /// internal sealed class TestCategoryItem : IXmlTestStore { - #region Fields [StoreXmlSimpleField(Location = "@TestCategory", DefaultValue = "")] private readonly string _category = string.Empty; - #endregion - - #region Constructors /// /// Create a new item with the category set /// @@ -42,9 +37,6 @@ public TestCategoryItem(string category) _category = StripIllegalChars(category); } - #endregion - - #region Properties/Methods /// /// Gets the category for this TestCategory /// @@ -66,9 +58,6 @@ private string StripIllegalChars(string category) return ret; } - #endregion - - #region Methods - overrides /// /// Compare the values of the items /// @@ -103,10 +92,6 @@ public override string ToString() Debug.Assert(_category != null, "category is null"); return _category; } - #endregion - - #region IXmlTestStore Members - /// /// Saves the class under the XmlElement. /// @@ -117,17 +102,12 @@ public void Save(System.Xml.XmlElement element, XmlTestStoreParameters parameter new XmlPersistence().SaveSingleFields(element, this, parameters); } - #endregion } -#endregion - -#region TestCategoryItemCollection /// /// A collection of strings which categorize the test. /// internal sealed class TestCategoryItemCollection : EqtBaseCollection { - #region Constructors /// /// Creates an empty TestCategoryItemCollection. /// @@ -148,10 +128,6 @@ public TestCategoryItemCollection(string[] items) } } - #endregion - - #region Methods - /// /// Adds the category. /// @@ -263,6 +239,4 @@ public override int GetHashCode() { return base.GetHashCode(); } - #endregion } -#endregion diff --git a/src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/TestEntry.cs b/src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/TestEntry.cs index 1d825dfaf4..f6f5d23e0b 100644 --- a/src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/TestEntry.cs +++ b/src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/TestEntry.cs @@ -16,16 +16,10 @@ namespace Microsoft.TestPlatform.Extensions.TrxLogger.ObjectModel; /// internal sealed class TestEntry : IXmlTestStore { - #region Fields - private readonly TestId _testId; private readonly TestListCategoryId _categoryId; private List _testEntries; - #endregion - - #region Constructors - /// /// Constructor. /// Note that using this constructor has different effect as setting CategoryId property. @@ -39,10 +33,6 @@ public TestEntry(TestId testId, TestListCategoryId catId) _categoryId = catId; } - #endregion - - #region Properties - /// /// Gets or sets the exec id. /// @@ -66,10 +56,6 @@ public List TestEntries } } - #endregion - - #region Overrides - /// /// Override function for Equals. /// @@ -107,10 +93,6 @@ public override int GetHashCode() return ExecutionId.GetHashCode(); } - #endregion - - #region IXmlTestStore Members - /// /// Saves the class under the XmlElement.. /// @@ -134,5 +116,4 @@ public void Save(System.Xml.XmlElement element, XmlTestStoreParameters parameter helper.SaveIEnumerable(TestEntries, element, "TestEntries", ".", "TestEntry", parameters); } - #endregion } diff --git a/src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/TestId.cs b/src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/TestId.cs index 533aff182f..27e6e5e06b 100644 --- a/src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/TestId.cs +++ b/src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/TestId.cs @@ -12,14 +12,11 @@ namespace Microsoft.TestPlatform.Extensions.TrxLogger.ObjectModel; using XML; -#region TestId /// /// Class that uniquely identifies a test. /// internal sealed class TestId : IEquatable, IComparable, IComparable, IXmlTestStore { - #region Constants - /// /// Key in for specifying the location where the test ID is stored, under an XML element /// @@ -30,10 +27,6 @@ internal sealed class TestId : IEquatable, IComparable, ICompara /// private const string DefaultIdLocation = "@testId"; - #endregion - - #region Constructors - /// /// Generates a new test ID /// @@ -51,10 +44,6 @@ public TestId(Guid id) Id = id; } - #endregion - - #region Properties - /// /// Gets an empty test ID /// @@ -65,10 +54,6 @@ public TestId(Guid id) /// public Guid Id { get; } - #endregion - - #region IXmlTestStore Members - /// /// Saves the state to the XML element /// @@ -108,12 +93,6 @@ private void GetIdLocation(XmlTestStoreParameters parameters, out string idLocat } } - #endregion - - #region Equality - - #region IEquatable Members - /// /// Compares this instance with the other test ID for value equality /// @@ -136,10 +115,6 @@ private bool ValueEquals(TestId other) return other is not null && Id == other.Id; } - #endregion - - #region Overrides - /// /// Compares this instance with the other test ID for value equality /// @@ -159,10 +134,6 @@ public override int GetHashCode() return Id.GetHashCode(); } - #endregion - - #region Operators - /// /// Compares the two test IDs for value equality /// @@ -187,14 +158,6 @@ public override int GetHashCode() return !(left == right); } - #endregion - - #endregion - - #region Comparison - - #region IComparable Members - /// /// Compares this instance with the other test ID /// @@ -208,10 +171,6 @@ public int CompareTo(TestId other) return other == null ? throw new ArgumentNullException(nameof(other)) : Id.CompareTo(other.Id); } - #endregion - - #region IComparable Members - /// /// Compares this instance with the other test ID /// @@ -225,12 +184,6 @@ public int CompareTo(object other) return CompareTo(other as TestId); } - #endregion - - #endregion - - #region Overrides - /// /// Override ToString /// @@ -244,6 +197,4 @@ public override string ToString() return string.Format(CultureInfo.InvariantCulture, s); } - #endregion } -#endregion TestId diff --git a/src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/TestListCategory.cs b/src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/TestListCategory.cs index e907fa8985..bf813e2169 100644 --- a/src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/TestListCategory.cs +++ b/src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/TestListCategory.cs @@ -18,8 +18,6 @@ namespace Microsoft.TestPlatform.Extensions.TrxLogger.ObjectModel; /// internal class TestListCategory : IXmlTestStore { - #region Fields - private static TestListCategory s_uncategorizedResults; private static TestListCategory s_allResults; @@ -30,8 +28,6 @@ internal class TestListCategory : IXmlTestStore private TestListCategoryId _parentCategoryId; - #endregion - /// /// Constructor for TestListCategory . /// @@ -64,8 +60,6 @@ private TestListCategory(string name, TestListCategoryId id, TestListCategoryId Id = id; } - #region Properties - /// /// Gets the uncategorized results. /// @@ -135,10 +129,6 @@ public TestListCategoryId ParentCategoryId } } - #endregion - - #region Overrides - /// /// Override function for Equals. /// @@ -169,10 +159,6 @@ public override int GetHashCode() { return Id.GetHashCode(); } - #endregion - - #region IXmlTestStore Members - /// /// Saves the class under the XmlElement.. /// @@ -191,5 +177,4 @@ public void Save(System.Xml.XmlElement element, XmlTestStoreParameters parameter h.SaveGuid(element, "@parentListId", ParentCategoryId.Id); } - #endregion } diff --git a/src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/TestMethod.cs b/src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/TestMethod.cs index c0af63b5c4..25ac9be8b7 100644 --- a/src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/TestMethod.cs +++ b/src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/TestMethod.cs @@ -37,8 +37,6 @@ public TestMethod(string name, string className) /// public bool IsValid { get; set; } - #region Override - /// /// Override function for Equals. /// @@ -65,10 +63,6 @@ public override int GetHashCode() return Name?.GetHashCode() ?? 0; } - #endregion Override - - #region IXmlTestStore Members - /// /// Saves the class under the XmlElement.. /// @@ -86,5 +80,4 @@ public void Save(XmlElement element, XmlTestStoreParameters parameters) helper.SaveSimpleField(element, "isValid", IsValid, false); } - #endregion } diff --git a/src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/TestResult.cs b/src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/TestResult.cs index be0595a48c..9233f13d8f 100644 --- a/src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/TestResult.cs +++ b/src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/TestResult.cs @@ -22,14 +22,8 @@ namespace Microsoft.TestPlatform.Extensions.TrxLogger.ObjectModel; /// internal sealed class TestResultId : IXmlTestStore { - #region Fields - private Guid _runId; - #endregion - - #region Constructor - /// /// Initializes a new instance of the class. /// @@ -53,10 +47,6 @@ public TestResultId(Guid runId, Guid executionId, Guid parentExecutionId, Guid t TestId = testId; } - #endregion - - #region properties - /// /// Gets the execution id. /// @@ -72,10 +62,6 @@ public TestResultId(Guid runId, Guid executionId, Guid parentExecutionId, Guid t /// public Guid TestId { get; } - #endregion - - #region Overrides - /// /// Override function for Equals /// @@ -111,10 +97,6 @@ public override string ToString() { return ExecutionId.ToString("B"); } - #endregion - - #region IXmlTestStore Members - /// /// Saves the class under the XmlElement.. /// @@ -136,7 +118,6 @@ public void Save(System.Xml.XmlElement element, XmlTestStoreParameters parameter helper.SaveGuid(element, "@testId", TestId); } - #endregion } /// @@ -169,8 +150,6 @@ public string StackTrace set { _stackTrace = value; } } - #region IXmlTestStore Members - /// /// Saves the class under the XmlElement.. /// @@ -185,7 +164,6 @@ public void Save(System.Xml.XmlElement element, XmlTestStoreParameters parameter XmlPersistence.SaveUsingReflection(element, this, typeof(TestResultErrorInfo), parameters); } - #endregion } /// @@ -193,8 +171,6 @@ public void Save(System.Xml.XmlElement element, XmlTestStoreParameters parameter /// internal class TestResult : ITestResult, IXmlTestStore { - #region Fields - private readonly string _resultName; private string _stdOut; private string _stdErr; @@ -217,10 +193,6 @@ internal class TestResult : ITestResult, IXmlTestStore /// private readonly List _collectorDataEntries = new(); - #endregion - - #region Constructor - /// /// Initializes a new instance of the class. /// @@ -264,10 +236,6 @@ public TestResult( _trxFileHelper = trxFileHelper; } - #endregion - - #region properties - /// /// Gets or sets the end time. /// @@ -422,9 +390,6 @@ public string TestResultsDirectory /// public string ResultType { get; set; } - #endregion - - #region Overrides public override bool Equals(object obj) { if (obj is not TestResult trm) @@ -442,8 +407,6 @@ public override int GetHashCode() return Id.GetHashCode(); } - #endregion - /// /// Helper function to add a text message info to the test result /// @@ -501,8 +464,6 @@ internal void AddCollectorDataEntries(IEnumerable collectorD } - #region IXmlTestStore Members - /// /// Saves the class under the XmlElement.. /// @@ -548,8 +509,6 @@ public virtual void Save(System.Xml.XmlElement element, XmlTestStoreParameters p helper.SaveSimpleField(element, "@resultType", ResultType, string.Empty); } - #endregion - private void Initialize() { _textMessages = new ArrayList(); diff --git a/src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/TestRun.cs b/src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/TestRun.cs index 3d2505fe66..9760b7aef1 100644 --- a/src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/TestRun.cs +++ b/src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/TestRun.cs @@ -22,10 +22,6 @@ namespace Microsoft.TestPlatform.Extensions.TrxLogger.ObjectModel; /// internal sealed class TestRun { - #region Fields - - #region Summary fields - // These fields will be valid when the test run summary is loaded from a results file. // The summary fields need to be first in the class so they get serialized first. When we // read the summary we don't want to parse the XML tags for other fields because they can @@ -47,9 +43,6 @@ internal sealed class TestRun private TestRunConfiguration _runConfig; - #endregion Summary fields - - #region Non-summary fields [StoreXmlSimpleField("Times/@creation")] private DateTime _created; @@ -62,12 +55,6 @@ internal sealed class TestRun [StoreXmlSimpleField("Times/@finish")] private DateTime _finished; - #endregion - - #endregion - - #region Constructors - /// /// Initializes a new instance of the class. /// @@ -82,8 +69,6 @@ internal TestRun(Guid runId) _id = runId; } - #endregion Constructors - /// /// Gets or sets the run configuration. /// diff --git a/src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/TestRunConfiguration.cs b/src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/TestRunConfiguration.cs index eb2c607e81..d406e45f87 100644 --- a/src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/TestRunConfiguration.cs +++ b/src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/TestRunConfiguration.cs @@ -21,7 +21,6 @@ internal class TestRunConfiguration : IXmlTestStore, IXmlTestStoreCustom { internal static readonly string DeploymentInDirectorySuffix = "In"; - #region Fields private readonly TestRunConfigurationId _id; private readonly TrxFileHelper _trxFileHelper; @@ -30,8 +29,6 @@ internal class TestRunConfiguration : IXmlTestStore, IXmlTestStoreCustom private string _runDeploymentRoot; - #endregion - /// /// Initializes a new instance of the class. /// @@ -51,8 +48,6 @@ internal TestRunConfiguration(string name, TrxFileHelper trxFileHelper) _trxFileHelper = trxFileHelper; } - #region IXmlTestStoreCustom Members - /// /// Gets the element name. /// @@ -75,8 +70,6 @@ public string NamespaceUri } } - #endregion - /// /// Gets directory that receives reverse-deployed files from Controller. /// @@ -108,8 +101,6 @@ internal string RunDeploymentRootDirectory } } - #region IXmlTestStore Members - /// /// Saves the class under the XmlElement.. /// @@ -158,5 +149,4 @@ public void Save(XmlElement element, XmlTestStoreParameters parameters) } } - #endregion } diff --git a/src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/TestRunSummary.cs b/src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/TestRunSummary.cs index ae10414390..29c695e258 100644 --- a/src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/TestRunSummary.cs +++ b/src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/TestRunSummary.cs @@ -16,8 +16,6 @@ namespace Microsoft.TestPlatform.Extensions.TrxLogger.ObjectModel; /// internal class TestRunSummary : IXmlTestStore { - #region Fields - [StoreXmlSimpleField("Counters/@total")] private readonly int _totalTests; [StoreXmlSimpleField("Counters/@executed")] @@ -61,10 +59,6 @@ internal class TestRunSummary : IXmlTestStore private readonly IList _resultFiles; - #endregion - - #region constructor - /// /// Initializes a new instance of the class. /// @@ -132,10 +126,6 @@ public TestRunSummary( _collectorDataEntries = dataCollectors; } - #endregion - - #region IXmlTestStore Members - /// /// Saves the class under the XmlElement.. /// @@ -154,5 +144,4 @@ public void Save(XmlElement element, XmlTestStoreParameters parameters) helper.SaveIEnumerable(_collectorDataEntries, element, "CollectorDataEntries", ".", "Collector", parameters); } - #endregion } diff --git a/src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/TestType.cs b/src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/TestType.cs index c97e287e3f..44d4f6f3b3 100644 --- a/src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/TestType.cs +++ b/src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/TestType.cs @@ -43,8 +43,6 @@ public override int GetHashCode() return _typeId.GetHashCode(); } - #region IXmlTestStore Members - /// /// Saves the class under the XmlElement.. /// @@ -59,5 +57,4 @@ public void Save(System.Xml.XmlElement element, XmlTestStoreParameters parameter XmlPersistence.SaveUsingReflection(element, this, null, parameters); } - #endregion } diff --git a/src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/UriDataAttachment.cs b/src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/UriDataAttachment.cs index aff5993aab..76a82f0f42 100644 --- a/src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/UriDataAttachment.cs +++ b/src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/UriDataAttachment.cs @@ -21,14 +21,10 @@ namespace Microsoft.TestPlatform.Extensions.TrxLogger.ObjectModel; internal class UriDataAttachment : IDataAttachment, IXmlTestStore { private readonly TrxFileHelper _trxFileHelper; - #region Private fields - /// /// The name for the attachment /// - #endregion - /// /// Initializes the URI data attachment /// @@ -44,8 +40,6 @@ public UriDataAttachment(string description, Uri uri, TrxFileHelper trxFileHelpe Initialize(description, uri); } - #region IDataAttachment Members - /// /// Gets short description for the attachment. /// @@ -56,10 +50,6 @@ public UriDataAttachment(string description, Uri uri, TrxFileHelper trxFileHelpe /// public Uri Uri { get; private set; } - #endregion - - #region IXmlTestStore Members - /// /// Saves the class under the XmlElement. /// @@ -86,10 +76,6 @@ public void Save(XmlElement element, XmlTestStoreParameters parameters) helper.SaveSimpleField(element, "@href", Uri.OriginalString, null); } - #endregion - - #region Internal Methods - /// /// Clones the instance and makes the URI in the clone absolute using the specified base directory /// @@ -113,10 +99,6 @@ internal UriDataAttachment Clone(string baseDirectory, bool useAbsoluteUri) return this; } - #endregion - - #region Private Methods - private void Initialize(string desc, Uri uri) { EqtAssert.ParameterNotNull(desc, nameof(desc)); @@ -126,5 +108,4 @@ private void Initialize(string desc, Uri uri) Uri = uri; } - #endregion } diff --git a/src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/WorkItems.cs b/src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/WorkItems.cs index 029ed748bf..2a31286b30 100644 --- a/src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/WorkItems.cs +++ b/src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/WorkItems.cs @@ -12,19 +12,14 @@ namespace Microsoft.TestPlatform.Extensions.TrxLogger.ObjectModel; using XML; -#region WorkItem /// /// Stores an int which represents a workitem /// internal sealed class WorkItem : IXmlTestStore { - #region Fields [StoreXmlField(Location = ".")] private readonly int _id = 0; - #endregion - - #region Constructors /// /// Create a new item with the workitem set /// @@ -34,9 +29,6 @@ public WorkItem(int workitemId) _id = workitemId; } - #endregion - - #region Properties/Methods /// /// Gets the id for this WorkItem /// @@ -48,9 +40,6 @@ public int Id } } - #endregion - - #region Methods - overrides /// /// Compare the values of the items /// @@ -78,10 +67,6 @@ public override string ToString() { return _id.ToString(CultureInfo.InvariantCulture); } - #endregion - - #region IXmlTestStore Members - /// /// Saves the class under the XmlElement. /// @@ -92,17 +77,12 @@ public void Save(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. /// @@ -123,9 +103,6 @@ public WorkItemCollection(int[] items) } } - #endregion - - #region Methods /// /// Adds the workitem. /// @@ -233,6 +210,4 @@ public override void Save(XmlElement element, XmlTestStoreParameters parameters) XmlPersistence xmlPersistence = new(); xmlPersistence.SaveHashtable(_container, element, ".", ".", null, "Workitem", parameters); } - #endregion } -#endregion diff --git a/src/Microsoft.TestPlatform.Extensions.TrxLogger/TrxLogger.cs b/src/Microsoft.TestPlatform.Extensions.TrxLogger/TrxLogger.cs index c66158f510..c609ecf6f8 100644 --- a/src/Microsoft.TestPlatform.Extensions.TrxLogger/TrxLogger.cs +++ b/src/Microsoft.TestPlatform.Extensions.TrxLogger/TrxLogger.cs @@ -38,8 +38,6 @@ namespace Microsoft.VisualStudio.TestPlatform.Extensions.TrxLogger; [ExtensionUri(TrxLoggerConstants.ExtensionUri)] public class TrxLogger : ITestLoggerWithParameters { - #region Constructor - /// /// Initializes a new instance of the class. /// @@ -58,10 +56,6 @@ internal TrxLogger(IFileHelper fileHelper, TrxFileHelper trxFileHelper) _trxFileHelper = trxFileHelper; } - #endregion - - #region Fields - /// /// Cache the TRX file path /// @@ -98,10 +92,6 @@ internal TrxLogger(IFileHelper fileHelper, TrxFileHelper trxFileHelper) /// private string _testResultsDirPath; - #endregion - - #region ITestLogger - /// public void Initialize(TestLoggerEvents events!!, string testResultsDirPath) { @@ -142,10 +132,6 @@ public void Initialize(TestLoggerEvents events, Dictionary param _parametersDictionary = parameters; Initialize(events, _parametersDictionary[DefaultLoggerParameterNames.TestRunDirectory]); } - #endregion - - #region ForTesting - internal string GetRunLevelInformationalMessage() { return _runLevelStdOut.ToString(); @@ -183,10 +169,6 @@ internal int TestEntryCount internal TrxLoggerObjectModel.TestOutcome TestResultOutcome { get; private set; } = TrxLoggerObjectModel.TestOutcome.Passed; - #endregion - - #region Event Handlers - /// /// Called when a test message is received. /// @@ -741,5 +723,4 @@ private TrxLoggerObjectModel.TestOutcome ChangeTestOutcomeIfNecessary(TrxLoggerO return outcome; } - #endregion } diff --git a/src/Microsoft.TestPlatform.Extensions.TrxLogger/Utility/Collection.cs b/src/Microsoft.TestPlatform.Extensions.TrxLogger/Utility/Collection.cs index 77cdd6e2df..1477bc80e1 100644 --- a/src/Microsoft.TestPlatform.Extensions.TrxLogger/Utility/Collection.cs +++ b/src/Microsoft.TestPlatform.Extensions.TrxLogger/Utility/Collection.cs @@ -19,7 +19,6 @@ namespace Microsoft.TestPlatform.Extensions.TrxLogger.Utility; /// internal class EqtBaseCollection : ICollection, IXmlTestStore { - #region private classes /// /// Wraps non-generic enumerator. /// @@ -58,15 +57,9 @@ public void Dispose() { } } - #endregion - - #region Fields protected Hashtable _container; private string _childElementName; - #endregion - - #region Constructors protected EqtBaseCollection() { _container = new Hashtable(); @@ -90,9 +83,6 @@ protected EqtBaseCollection(EqtBaseCollection other) EqtAssert.ParameterNotNull(other, nameof(other)); _container = new Hashtable(other._container); } - #endregion - - #region Methods: ICollection // TODO: Consider putting check for null to derived classes. public virtual void Add(T item) { @@ -158,9 +148,6 @@ public bool IsReadOnly { get { return false; } } - #endregion - - #region IEnumerable public virtual IEnumerator GetEnumerator() { return _container.Keys.GetEnumerator(); @@ -170,10 +157,6 @@ IEnumerator IEnumerable.GetEnumerator() { return new EqtBaseCollectionEnumerator(GetEnumerator()); } - #endregion - - #region IXmlTestStore Members - /// /// Default behavior is to create child elements with name same as name of type T. /// Does not respect IXmlTestStoreCustom. @@ -184,9 +167,6 @@ public virtual void Save(XmlElement element, XmlTestStoreParameters parameters) xmlPersistence.SaveHashtable(_container, element, ".", ".", null, ChildElementName, parameters); } - #endregion - - #region Private private string ChildElementName { get @@ -199,5 +179,4 @@ private string ChildElementName return _childElementName; } } - #endregion } diff --git a/src/Microsoft.TestPlatform.Extensions.TrxLogger/Utility/TrxFileHelper.cs b/src/Microsoft.TestPlatform.Extensions.TrxLogger/Utility/TrxFileHelper.cs index b1673d0547..2dff2d0d96 100644 --- a/src/Microsoft.TestPlatform.Extensions.TrxLogger/Utility/TrxFileHelper.cs +++ b/src/Microsoft.TestPlatform.Extensions.TrxLogger/Utility/TrxFileHelper.cs @@ -27,8 +27,6 @@ internal class TrxFileHelper private static readonly Regex ReservedFileNamesRegex = new(@"(?i:^(CON|PRN|AUX|NUL|COM[1-9]|LPT[1-9]|CLOCK\$)(\..*)?)$"); private readonly Func _timeProvider; - #region Constructors - // Have to init InvalidFileNameChars dynamically. static TrxFileHelper() { @@ -64,8 +62,6 @@ public TrxFileHelper(Func timeProvider) _timeProvider = timeProvider ?? (() => DateTime.Now); } - #endregion - /// /// Replaces invalid file name chars in the specified string and changes it if it is a reserved file name. /// diff --git a/src/Microsoft.TestPlatform.Extensions.TrxLogger/XML/XmlFilePersistence.cs b/src/Microsoft.TestPlatform.Extensions.TrxLogger/XML/XmlFilePersistence.cs index 1efbf70c92..94f05b1592 100644 --- a/src/Microsoft.TestPlatform.Extensions.TrxLogger/XML/XmlFilePersistence.cs +++ b/src/Microsoft.TestPlatform.Extensions.TrxLogger/XML/XmlFilePersistence.cs @@ -7,8 +7,6 @@ namespace Microsoft.TestPlatform.Extensions.TrxLogger.XML; internal class XmlFilePersistence : XmlPersistence { - #region Constants - /// /// Type of the object that is persisted to the file, the object that represents the root element /// @@ -19,5 +17,4 @@ internal class XmlFilePersistence : XmlPersistence /// public const string DirectoryPath = "DirectoryPath"; - #endregion } diff --git a/src/Microsoft.TestPlatform.Extensions.TrxLogger/XML/XmlPersistence.cs b/src/Microsoft.TestPlatform.Extensions.TrxLogger/XML/XmlPersistence.cs index b4542b5170..bc0b72b066 100644 --- a/src/Microsoft.TestPlatform.Extensions.TrxLogger/XML/XmlPersistence.cs +++ b/src/Microsoft.TestPlatform.Extensions.TrxLogger/XML/XmlPersistence.cs @@ -28,16 +28,12 @@ namespace Microsoft.TestPlatform.Extensions.TrxLogger.XML; /// internal class XmlPersistence { - #region Types - /// /// The exception type that is thrown when a duplicate key is added to a hashtable or /// dictionary /// public class DuplicateKeyLoadException : Exception { - #region Constructors - /// /// Initializes the instance /// @@ -60,10 +56,6 @@ public DuplicateKeyLoadException(object key, string message, Exception innerExce Key = key; } - #endregion - - #region Properties - /// /// Gets the key that was a duplicate /// @@ -73,13 +65,8 @@ public object Key private set; } - #endregion } - #endregion - - #region Fields - /// This is how we persist date time except DateTime.MinValue. private const string DateTimePersistenceFormat = "yyyy'-'MM'-'ddTHH':'mm':'ss'.'fffffffzzz"; @@ -109,10 +96,6 @@ public object Key private readonly string _namespaceUri; private readonly XmlNamespaceManager _xmlNamespaceManager = new(new NameTable()); - #endregion Fields - - #region Constructors - /// /// Initializes a new instance of the class. /// @@ -141,8 +124,6 @@ public XmlPersistence() } } - #endregion Constructors - /// /// Create root element. /// @@ -169,8 +150,6 @@ private XmlElement CreateRootElement(string name, string namespaceUri) return (XmlElement)dom.AppendChild(dom.CreateElement(_prefix, name, namespaceUri)); } - #region PublicSaveDataInTrx - /// /// Save single fields. /// @@ -387,7 +366,6 @@ public void SaveStringDictionary(StringDictionary dict, XmlElement element, stri } } - #region Lists /// /// Save list of object . /// @@ -458,8 +436,6 @@ public void SaveList(IList list, XmlElement element, string listXmlElement } } - #region Counters - public void SaveCounters(XmlElement xml, string location, int[] counters) { xml = (XmlElement)LocationToXmlNode(xml, location); @@ -474,22 +450,12 @@ public void SaveCounters(XmlElement xml, string location, int[] counters) } } - #endregion Counters - - #endregion List - internal static void SaveUsingReflection(XmlElement element, object instance, Type requestedType, XmlTestStoreParameters parameters) { XmlPersistence helper = new(); helper.SaveSingleFields(element, instance, requestedType, parameters); } - #endregion PublicSaveDataInTrx - - #region Utilities - - #region Optimization: Reflection caching - /// /// Updates the cache if needed and gets the field info collection /// @@ -542,8 +508,6 @@ FieldInfo reflectedFieldInfo in return toReturn; } - #endregion Optimization: Reflection caching - /// /// Convert dateTime to string. /// @@ -836,10 +800,6 @@ private string ProcessXPathQuery(string queryIn) return queryString; } - #endregion Utilities - - #region Types - private class NewElementCreateData { public string NamespaceUri { get; set; } @@ -873,5 +833,4 @@ internal FieldPersistenceInfo(FieldInfo fieldInfo) } } - #endregion } diff --git a/src/Microsoft.TestPlatform.ObjectModel/Adapter/TestPlatformFormatException.cs b/src/Microsoft.TestPlatform.ObjectModel/Adapter/TestPlatformFormatException.cs index 5cd5f0a529..9ffcb76a09 100644 --- a/src/Microsoft.TestPlatform.ObjectModel/Adapter/TestPlatformFormatException.cs +++ b/src/Microsoft.TestPlatform.ObjectModel/Adapter/TestPlatformFormatException.cs @@ -19,8 +19,6 @@ namespace Microsoft.VisualStudio.TestPlatform.ObjectModel.Adapter; #endif public class TestPlatformFormatException : Exception { - #region Constructors - /// /// Creates a new TestPlatformFormatException /// @@ -72,8 +70,6 @@ protected TestPlatformFormatException(SerializationInfo info, StreamingContext c } #endif - #endregion - /// /// Filter expression. /// diff --git a/src/Microsoft.TestPlatform.ObjectModel/Adapter/TestsCanceledException.cs b/src/Microsoft.TestPlatform.ObjectModel/Adapter/TestsCanceledException.cs index dc8c1c3147..ca08b3f6e5 100644 --- a/src/Microsoft.TestPlatform.ObjectModel/Adapter/TestsCanceledException.cs +++ b/src/Microsoft.TestPlatform.ObjectModel/Adapter/TestsCanceledException.cs @@ -20,8 +20,6 @@ namespace Microsoft.VisualStudio.TestPlatform.ObjectModel.Adapter; #endif public class TestCanceledException : Exception { - #region Constructors - /// /// Creates a new TestCanceledException /// @@ -58,5 +56,4 @@ protected TestCanceledException(SerializationInfo info, StreamingContext context } #endif - #endregion } diff --git a/src/Microsoft.TestPlatform.ObjectModel/DataCollector/Common/FileHelper.cs b/src/Microsoft.TestPlatform.ObjectModel/DataCollector/Common/FileHelper.cs index a1caa12a64..ae7cb9b3ab 100644 --- a/src/Microsoft.TestPlatform.ObjectModel/DataCollector/Common/FileHelper.cs +++ b/src/Microsoft.TestPlatform.ObjectModel/DataCollector/Common/FileHelper.cs @@ -16,7 +16,6 @@ internal sealed class FileHelper private static readonly Dictionary InvalidFileNameChars; private static readonly Regex ReservedFileNamesRegex = new(@"(?i:^(CON|PRN|AUX|NUL|COM[1-9]|LPT[1-9]|CLOCK\$)(\..*)?)$"); - #region Constructors static FileHelper() { // Create a hash table of invalid chars. @@ -31,9 +30,6 @@ static FileHelper() private FileHelper() { } - #endregion - - #region Fields /// /// Determines if a file name has invalid characters. /// @@ -80,5 +76,4 @@ internal static bool IsReservedFileName(string fileName) return ReservedFileNamesRegex.Match(fileName).Success; } - #endregion } diff --git a/src/Microsoft.TestPlatform.ObjectModel/DataCollector/Common/RequestId.cs b/src/Microsoft.TestPlatform.ObjectModel/DataCollector/Common/RequestId.cs index 62483b78ee..54ab0c9973 100644 --- a/src/Microsoft.TestPlatform.ObjectModel/DataCollector/Common/RequestId.cs +++ b/src/Microsoft.TestPlatform.ObjectModel/DataCollector/Common/RequestId.cs @@ -17,17 +17,11 @@ namespace Microsoft.VisualStudio.TestPlatform.ObjectModel.DataCollection; [DataContract] public sealed class RequestId : IEquatable, IComparable, IComparable { - #region Constants - /// /// A request ID with an empty GUID /// public static readonly RequestId Empty = new(Guid.Empty); - #endregion - - #region Constructors - /// /// Initializes the instance by creating a new GUID /// @@ -45,10 +39,6 @@ internal RequestId(Guid id) Id = id; } - #endregion - - #region Overrides - /// /// Compares this instance with the provided object for value equality /// @@ -88,12 +78,6 @@ public override string ToString() return Id.ToString("B"); } - #endregion - - #region Interface implementations - - #region IEquatable Members - /// /// Compares this instance with the provided request ID for value equality /// @@ -108,10 +92,6 @@ public bool Equals(RequestId other) ); } - #endregion - - #region IComparable Members - /// /// Compares this instance with the provided request ID /// @@ -122,10 +102,6 @@ public int CompareTo(RequestId other) return other == null ? 1 : Id.CompareTo(other.Id); } - #endregion - - #region IComparable Members - /// /// Compares this instance with the provided object /// @@ -147,12 +123,6 @@ public int CompareTo(object obj) : Id.CompareTo(other.Id); } - #endregion - - #endregion - - #region Operators - /// /// Compares the two request IDs for value equality /// @@ -179,10 +149,6 @@ right is not null && return !(left == right); } - #endregion - - #region Properties - /// /// Gets the underlying GUID that represents the request ID /// @@ -193,5 +159,4 @@ public Guid Id private set; } - #endregion } diff --git a/src/Microsoft.TestPlatform.ObjectModel/DataCollector/DataCollectionContext.cs b/src/Microsoft.TestPlatform.ObjectModel/DataCollector/DataCollectionContext.cs index 8c8d5e50e1..4c00a39cf7 100644 --- a/src/Microsoft.TestPlatform.ObjectModel/DataCollector/DataCollectionContext.cs +++ b/src/Microsoft.TestPlatform.ObjectModel/DataCollector/DataCollectionContext.cs @@ -13,8 +13,6 @@ namespace Microsoft.VisualStudio.TestPlatform.ObjectModel.DataCollection; [DataContract] public class DataCollectionContext { - #region Constructors - // NOTE: These constructors are protected internal to allow 3rd parties to // do unit testing of their data collectors. // @@ -73,10 +71,6 @@ protected internal DataCollectionContext(SessionId sessionId, TestExecId testExe TestCase = testCase; } - #endregion - - #region Properties - /// /// Gets test case. /// @@ -105,10 +99,6 @@ public bool HasTestCase get { return TestExecId != null; } } - #endregion - - #region Equals and Hashcode - public static bool operator ==(DataCollectionContext context1, DataCollectionContext context2) { return Equals(context1, context2); @@ -133,10 +123,6 @@ public override int GetHashCode() return _hashCode; } - #endregion - - #region Private Methods - private int ComputeHashCode() { int hashCode = 17; @@ -151,11 +137,6 @@ private int ComputeHashCode() return hashCode; } - #endregion - - #region Private Fields - private readonly int _hashCode; - #endregion } diff --git a/src/Microsoft.TestPlatform.ObjectModel/DataCollector/DataCollectionEnvironmentContext.cs b/src/Microsoft.TestPlatform.ObjectModel/DataCollector/DataCollectionEnvironmentContext.cs index f41f67bf95..a4b9c7f5db 100644 --- a/src/Microsoft.TestPlatform.ObjectModel/DataCollector/DataCollectionEnvironmentContext.cs +++ b/src/Microsoft.TestPlatform.ObjectModel/DataCollector/DataCollectionEnvironmentContext.cs @@ -17,15 +17,10 @@ namespace Microsoft.VisualStudio.TestPlatform.ObjectModel.DataCollection; #endif public sealed class DataCollectionEnvironmentContext { - #region Fields /// /// DataCollectionContext for the session. /// - #endregion - - #region Constructors and initialization - /// /// Default Constructor /// @@ -65,14 +60,9 @@ public static DataCollectionEnvironmentContext CreateForLocalEnvironment(DataCol return dataCollectionEnvironmentContext; } - #endregion - - #region Properties - /// /// DataCollectionContext for the session. /// public DataCollectionContext SessionDataCollectionContext { get; internal set; } - #endregion } diff --git a/src/Microsoft.TestPlatform.ObjectModel/DataCollector/DataCollectionLogger.cs b/src/Microsoft.TestPlatform.ObjectModel/DataCollector/DataCollectionLogger.cs index 832767c536..203e1f1466 100644 --- a/src/Microsoft.TestPlatform.ObjectModel/DataCollector/DataCollectionLogger.cs +++ b/src/Microsoft.TestPlatform.ObjectModel/DataCollector/DataCollectionLogger.cs @@ -19,8 +19,6 @@ protected DataCollectionLogger() { } - #region Public Members - /// /// Logs an error message. /// @@ -78,5 +76,4 @@ public virtual void LogException(DataCollectionContext context, Exception ex, Da { } - #endregion } diff --git a/src/Microsoft.TestPlatform.ObjectModel/DataCollector/DataCollectionSink.cs b/src/Microsoft.TestPlatform.ObjectModel/DataCollector/DataCollectionSink.cs index e43d639466..0cf9445d12 100644 --- a/src/Microsoft.TestPlatform.ObjectModel/DataCollector/DataCollectionSink.cs +++ b/src/Microsoft.TestPlatform.ObjectModel/DataCollector/DataCollectionSink.cs @@ -11,8 +11,6 @@ namespace Microsoft.VisualStudio.TestPlatform.ObjectModel.DataCollection; /// public abstract class DataCollectionSink { - #region Constructor - /// /// Initializes a new instance of the class. /// @@ -20,19 +18,11 @@ protected DataCollectionSink() { } - #endregion - - #region Events - /// /// Called when sending of a file has completed. /// public abstract event AsyncCompletedEventHandler SendFileCompleted; - #endregion - - #region SendFileAsync - /// /// Sends a file to up-stream components. /// @@ -65,5 +55,4 @@ public void SendFileAsync(DataCollectionContext context, string path, string des /// Information about the file to be transferred. public abstract void SendFileAsync(FileTransferInformation fileTransferInformation); - #endregion } diff --git a/src/Microsoft.TestPlatform.ObjectModel/DataCollector/DataCollector.cs b/src/Microsoft.TestPlatform.ObjectModel/DataCollector/DataCollector.cs index c1c47cb1ba..72dea54f0d 100644 --- a/src/Microsoft.TestPlatform.ObjectModel/DataCollector/DataCollector.cs +++ b/src/Microsoft.TestPlatform.ObjectModel/DataCollector/DataCollector.cs @@ -13,8 +13,6 @@ namespace Microsoft.VisualStudio.TestPlatform.ObjectModel.DataCollection; /// public abstract class DataCollector : IDisposable { - #region Methods - /// /// Initializes the data collector /// @@ -57,5 +55,4 @@ protected virtual void Dispose(bool disposing) { } - #endregion } diff --git a/src/Microsoft.TestPlatform.ObjectModel/DataCollector/Events/DataCollectionEventArgs.cs b/src/Microsoft.TestPlatform.ObjectModel/DataCollector/Events/DataCollectionEventArgs.cs index 21d27a51df..b95f0343ce 100644 --- a/src/Microsoft.TestPlatform.ObjectModel/DataCollector/Events/DataCollectionEventArgs.cs +++ b/src/Microsoft.TestPlatform.ObjectModel/DataCollector/Events/DataCollectionEventArgs.cs @@ -16,8 +16,6 @@ namespace Microsoft.VisualStudio.TestPlatform.ObjectModel.DataCollection; #endif public abstract class DataCollectionEventArgs : EventArgs { - #region Constructor - /// /// Default constructor added for serialization/deserialization. /// @@ -34,10 +32,6 @@ protected DataCollectionEventArgs(DataCollectionContext context) Context = context; } - #endregion - - #region Public properties - /// /// Gets the context information for the event /// @@ -47,10 +41,6 @@ public DataCollectionContext Context internal set; } - #endregion - - #region Private Methods - /// /// Updates the data collection context stored by this instance. /// @@ -67,5 +57,4 @@ internal void UpdateDataCollectionContext(DataCollectionContext context) Context = context; } - #endregion } diff --git a/src/Microsoft.TestPlatform.ObjectModel/DataCollector/Events/DataCollectionEvents.cs b/src/Microsoft.TestPlatform.ObjectModel/DataCollector/Events/DataCollectionEvents.cs index 523ba7e8f1..68f54a203d 100644 --- a/src/Microsoft.TestPlatform.ObjectModel/DataCollector/Events/DataCollectionEvents.cs +++ b/src/Microsoft.TestPlatform.ObjectModel/DataCollector/Events/DataCollectionEvents.cs @@ -12,8 +12,6 @@ namespace Microsoft.VisualStudio.TestPlatform.ObjectModel.DataCollection; /// public abstract class DataCollectionEvents { - #region Constructor - /// /// Initializes a new instance of the class. /// @@ -21,10 +19,6 @@ protected DataCollectionEvents() { } - #endregion - - #region Events - /// /// Raised when test host initialized /// @@ -50,5 +44,4 @@ protected DataCollectionEvents() /// public abstract event EventHandler TestCaseEnd; - #endregion } diff --git a/src/Microsoft.TestPlatform.ObjectModel/DataCollector/Events/SessionEvents.cs b/src/Microsoft.TestPlatform.ObjectModel/DataCollector/Events/SessionEvents.cs index 67dfdf5b90..a761b3e828 100644 --- a/src/Microsoft.TestPlatform.ObjectModel/DataCollector/Events/SessionEvents.cs +++ b/src/Microsoft.TestPlatform.ObjectModel/DataCollector/Events/SessionEvents.cs @@ -18,8 +18,6 @@ public sealed class SessionStartEventArgs : DataCollectionEventArgs { private readonly IDictionary _properties; - #region Constructor - /// /// Initializes a new instance of the class. /// @@ -57,10 +55,6 @@ public SessionStartEventArgs(DataCollectionContext context, IDictionary /// Gets session start properties enumerator /// @@ -97,7 +91,6 @@ public object GetPropertyValue(string property) return propertyValue; } - #endregion } /// @@ -106,8 +99,6 @@ public object GetPropertyValue(string property) [DataContract] public sealed class SessionEndEventArgs : DataCollectionEventArgs { - #region Constructor - /// /// Initializes a new instance of the class. /// @@ -132,5 +123,4 @@ public SessionEndEventArgs(DataCollectionContext context) Debug.Assert(!context.HasTestCase, "Session event has test a case context"); } - #endregion } diff --git a/src/Microsoft.TestPlatform.ObjectModel/DataCollector/Events/TestCaseEvents.cs b/src/Microsoft.TestPlatform.ObjectModel/DataCollector/Events/TestCaseEvents.cs index 7d4afba216..322da36565 100644 --- a/src/Microsoft.TestPlatform.ObjectModel/DataCollector/Events/TestCaseEvents.cs +++ b/src/Microsoft.TestPlatform.ObjectModel/DataCollector/Events/TestCaseEvents.cs @@ -15,8 +15,6 @@ namespace Microsoft.VisualStudio.TestPlatform.ObjectModel.DataCollection; [DataContract] public abstract class TestCaseEventArgs : DataCollectionEventArgs { - #region Constructor - /// /// Default constructor added for serialization/deserialization. /// @@ -82,10 +80,6 @@ protected TestCaseEventArgs( // !testElement.ParentExecId.Equals(TestExecId.Empty); } - #endregion - - #region Public properties - /// /// Gets the test case ID /// @@ -126,7 +120,6 @@ public TestCase TestElement internal set; } - #endregion } /// @@ -135,8 +128,6 @@ public TestCase TestElement [DataContract] public sealed class TestCaseStartEventArgs : TestCaseEventArgs { - #region Constructor - /// /// Default constructor for serialization/deserialization /// @@ -203,7 +194,6 @@ internal TestCaseStartEventArgs( Debug.Assert(context.HasTestCase, "Context is not for a test case"); } - #endregion } /// @@ -212,7 +202,6 @@ internal TestCaseStartEventArgs( [DataContract] public sealed class TestCaseEndEventArgs : TestCaseEventArgs { - #region Constructor /// /// Default constructor added for serialization/deserialization. /// @@ -320,10 +309,6 @@ internal TestCaseEndEventArgs( TestOutcome = testOutcome; } - #endregion - - #region Properties - /// /// Gets the outcome of the test. /// @@ -333,7 +318,6 @@ public TestOutcome TestOutcome get; private set; } - #endregion } /// @@ -342,8 +326,6 @@ public TestOutcome TestOutcome [DataContract] public sealed class TestResultEventArgs : TestCaseEventArgs { - #region Constructor - /// /// Default constructor for serialization/deserialization /// @@ -421,10 +403,6 @@ internal TestResultEventArgs( TestResult = testResult; } - #endregion - - #region Properties - /// /// Gets the outcome of the test. /// @@ -434,5 +412,4 @@ public TestResult TestResult get; private set; } - #endregion } diff --git a/src/Microsoft.TestPlatform.ObjectModel/DataCollector/Events/TestHostLaunchedEvent.cs b/src/Microsoft.TestPlatform.ObjectModel/DataCollector/Events/TestHostLaunchedEvent.cs index e21308c322..7fa5e81bb4 100644 --- a/src/Microsoft.TestPlatform.ObjectModel/DataCollector/Events/TestHostLaunchedEvent.cs +++ b/src/Microsoft.TestPlatform.ObjectModel/DataCollector/Events/TestHostLaunchedEvent.cs @@ -13,21 +13,11 @@ namespace Microsoft.VisualStudio.TestPlatform.ObjectModel.DataCollection; [DataContract] public sealed class TestHostLaunchedEventArgs : DataCollectionEventArgs { - #region Private members - /// /// Process id of the test host /// - #endregion - - #region Public properties - public int TestHostProcessId { get; } - #endregion - - #region Constructor - /// /// Initializes a new instance of the class. /// @@ -43,5 +33,4 @@ public TestHostLaunchedEventArgs(DataCollectionContext context, int processId) TestHostProcessId = processId; } - #endregion } diff --git a/src/Microsoft.TestPlatform.ObjectModel/DataCollector/TransferInformation/BaseTransferInformation.cs b/src/Microsoft.TestPlatform.ObjectModel/DataCollector/TransferInformation/BaseTransferInformation.cs index f05274784b..4dc2bf30a7 100644 --- a/src/Microsoft.TestPlatform.ObjectModel/DataCollector/TransferInformation/BaseTransferInformation.cs +++ b/src/Microsoft.TestPlatform.ObjectModel/DataCollector/TransferInformation/BaseTransferInformation.cs @@ -10,14 +10,8 @@ namespace Microsoft.VisualStudio.TestPlatform.ObjectModel.DataCollection; /// public abstract class BasicTransferInformation { - #region Fields - private string _description; - #endregion - - #region Constructor - /// /// Initializes a new instance of the class. /// @@ -31,19 +25,11 @@ protected BasicTransferInformation(DataCollectionContext context) Description = string.Empty; } - #endregion - - #region Required Parameters. - /// /// Gets the data collection context the transfer will be associated with. /// public DataCollectionContext Context { get; private set; } - #endregion - - #region Optional Parameters. - /// /// Gets or sets a short description of the data being sent. /// @@ -93,5 +79,4 @@ protected internal abstract string FileName get; } - #endregion } diff --git a/src/Microsoft.TestPlatform.ObjectModel/DataCollector/TransferInformation/FileTransferInformation.cs b/src/Microsoft.TestPlatform.ObjectModel/DataCollector/TransferInformation/FileTransferInformation.cs index d27b4db208..1611f3b639 100644 --- a/src/Microsoft.TestPlatform.ObjectModel/DataCollector/TransferInformation/FileTransferInformation.cs +++ b/src/Microsoft.TestPlatform.ObjectModel/DataCollector/TransferInformation/FileTransferInformation.cs @@ -17,7 +17,6 @@ public class FileTransferInformation : BasicTransferInformation { private readonly IFileHelper _fileHelper; - #region Constructor /// /// Initializes a new instance of the class. /// @@ -71,10 +70,6 @@ public FileTransferInformation(DataCollectionContext context, string path, bool PerformCleanup = deleteFile; } - #endregion - - #region Required Parameters. - /// /// Gets the path to the file on the local file system. /// @@ -90,5 +85,4 @@ public FileTransferInformation(DataCollectionContext context, string path, bool /// protected internal override string FileName => Path; - #endregion } diff --git a/src/Microsoft.TestPlatform.ObjectModel/DefaultExecutorUriAttribute.cs b/src/Microsoft.TestPlatform.ObjectModel/DefaultExecutorUriAttribute.cs index 63cfa6d8b4..05f5405efb 100644 --- a/src/Microsoft.TestPlatform.ObjectModel/DefaultExecutorUriAttribute.cs +++ b/src/Microsoft.TestPlatform.ObjectModel/DefaultExecutorUriAttribute.cs @@ -15,8 +15,6 @@ namespace Microsoft.VisualStudio.TestPlatform.ObjectModel; [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)] public sealed class DefaultExecutorUriAttribute : Attribute { - #region Constructor - /// /// Initializes with the Uri of the executor. /// @@ -31,15 +29,9 @@ public DefaultExecutorUriAttribute(string executorUri) ExecutorUri = executorUri; } - #endregion - - #region Properties - /// /// The Uri of the Test Executor. /// public string ExecutorUri { get; private set; } - #endregion - } diff --git a/src/Microsoft.TestPlatform.ObjectModel/ExtensionUriAttribute.cs b/src/Microsoft.TestPlatform.ObjectModel/ExtensionUriAttribute.cs index 74d104750d..b3ae9d0cd1 100644 --- a/src/Microsoft.TestPlatform.ObjectModel/ExtensionUriAttribute.cs +++ b/src/Microsoft.TestPlatform.ObjectModel/ExtensionUriAttribute.cs @@ -18,8 +18,6 @@ namespace Microsoft.VisualStudio.TestPlatform.ObjectModel; [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)] public sealed class ExtensionUriAttribute : Attribute { - #region Constructor - /// /// Initializes with the Uri of the extension. /// @@ -34,15 +32,9 @@ public ExtensionUriAttribute(string extensionUri) ExtensionUri = extensionUri; } - #endregion - - #region Properties - /// /// The Uri of the Test Executor. /// public string ExtensionUri { get; private set; } - #endregion - } diff --git a/src/Microsoft.TestPlatform.ObjectModel/FileExtensionAttribute.cs b/src/Microsoft.TestPlatform.ObjectModel/FileExtensionAttribute.cs index 6723d41e28..a9257dbee0 100644 --- a/src/Microsoft.TestPlatform.ObjectModel/FileExtensionAttribute.cs +++ b/src/Microsoft.TestPlatform.ObjectModel/FileExtensionAttribute.cs @@ -18,8 +18,6 @@ namespace Microsoft.VisualStudio.TestPlatform.ObjectModel; [AttributeUsage(AttributeTargets.Class, AllowMultiple = true)] public sealed class FileExtensionAttribute : Attribute { - #region Constructor - /// /// Initializes with a file extension that the test discoverer can process tests from. /// For example ".dll" or ".exe". @@ -35,14 +33,9 @@ public FileExtensionAttribute(string fileExtension) FileExtension = fileExtension; } - #endregion - - #region Properties - /// /// A file extensions that the test discoverer can process tests from. For example ".dll" or ".exe". /// public string FileExtension { get; private set; } - #endregion } diff --git a/src/Microsoft.TestPlatform.ObjectModel/FriendlyNameAttribute.cs b/src/Microsoft.TestPlatform.ObjectModel/FriendlyNameAttribute.cs index 58736caa9c..56d4412cb4 100644 --- a/src/Microsoft.TestPlatform.ObjectModel/FriendlyNameAttribute.cs +++ b/src/Microsoft.TestPlatform.ObjectModel/FriendlyNameAttribute.cs @@ -17,8 +17,6 @@ namespace Microsoft.VisualStudio.TestPlatform.ObjectModel; [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)] public sealed class FriendlyNameAttribute : Attribute { - #region Constructor - /// /// Initializes with the Friendly Name of the logger. /// @@ -33,15 +31,9 @@ public FriendlyNameAttribute(string friendlyName) FriendlyName = friendlyName; } - #endregion - - #region Properties - /// /// The friendly Name of the Test Logger. /// public string FriendlyName { get; private set; } - #endregion - } diff --git a/src/Microsoft.TestPlatform.ObjectModel/Host/ITestRunTimeProvider.cs b/src/Microsoft.TestPlatform.ObjectModel/Host/ITestRunTimeProvider.cs index 1473854428..3a5fe2806e 100644 --- a/src/Microsoft.TestPlatform.ObjectModel/Host/ITestRunTimeProvider.cs +++ b/src/Microsoft.TestPlatform.ObjectModel/Host/ITestRunTimeProvider.cs @@ -19,7 +19,6 @@ namespace Microsoft.VisualStudio.TestPlatform.ObjectModel.Host; /// public interface ITestRuntimeProvider { - #region events /// /// Raised when host is launched successfully /// Consumed by TestPlatform to initialize connection b/w test host and test platform @@ -31,8 +30,6 @@ public interface ITestRuntimeProvider /// event EventHandler HostExited; - #endregion - /// /// Gets a value indicating whether the test host is specific to a test source. If yes, each test source /// is launched in a separate host process. diff --git a/src/Microsoft.TestPlatform.ObjectModel/Logger/TestLoggerEvents.cs b/src/Microsoft.TestPlatform.ObjectModel/Logger/TestLoggerEvents.cs index d00f4dc0b5..6681304c84 100644 --- a/src/Microsoft.TestPlatform.ObjectModel/Logger/TestLoggerEvents.cs +++ b/src/Microsoft.TestPlatform.ObjectModel/Logger/TestLoggerEvents.cs @@ -14,8 +14,6 @@ namespace Microsoft.VisualStudio.TestPlatform.ObjectModel.Client; /// public abstract class TestLoggerEvents { - #region Constructor - /// /// Default constructor. /// @@ -23,10 +21,6 @@ protected TestLoggerEvents() { } - #endregion - - #region Events - /// /// Raised when a test message is received. /// @@ -67,5 +61,4 @@ protected TestLoggerEvents() /// public abstract event EventHandler DiscoveryComplete; - #endregion } diff --git a/src/Microsoft.TestPlatform.ObjectModel/Logging/Events/DataCollectionMessageEventArgs.cs b/src/Microsoft.TestPlatform.ObjectModel/Logging/Events/DataCollectionMessageEventArgs.cs index 39d07d8b44..87c7b488f6 100644 --- a/src/Microsoft.TestPlatform.ObjectModel/Logging/Events/DataCollectionMessageEventArgs.cs +++ b/src/Microsoft.TestPlatform.ObjectModel/Logging/Events/DataCollectionMessageEventArgs.cs @@ -14,7 +14,6 @@ namespace Microsoft.VisualStudio.TestPlatform.ObjectModel.Logging; [DataContract] public class DataCollectionMessageEventArgs : TestRunMessageEventArgs { - #region Constructor /// /// Constructor /// @@ -23,10 +22,6 @@ public class DataCollectionMessageEventArgs : TestRunMessageEventArgs public DataCollectionMessageEventArgs(TestMessageLevel level, string message) : base(level, message) { } - #endregion - - #region Properties - /// /// Friendly name of collector /// @@ -58,5 +53,4 @@ public Guid TestCaseId set; } - #endregion } diff --git a/src/Microsoft.TestPlatform.ObjectModel/Logging/Events/TestResultEventArgs.cs b/src/Microsoft.TestPlatform.ObjectModel/Logging/Events/TestResultEventArgs.cs index f5598003c4..f76ec254fa 100644 --- a/src/Microsoft.TestPlatform.ObjectModel/Logging/Events/TestResultEventArgs.cs +++ b/src/Microsoft.TestPlatform.ObjectModel/Logging/Events/TestResultEventArgs.cs @@ -12,8 +12,6 @@ namespace Microsoft.VisualStudio.TestPlatform.ObjectModel.Logging; /// public class TestResultEventArgs : EventArgs { - #region Constructor - /// /// Initializes a new instance of the class. /// @@ -25,14 +23,9 @@ public TestResultEventArgs(TestResult result!!) Result = result; } - #endregion - - #region Properties - /// /// Gets the Test Result. /// public TestResult Result { get; private set; } - #endregion } diff --git a/src/Microsoft.TestPlatform.ObjectModel/Logging/Events/TestRunMessageEventArgs.cs b/src/Microsoft.TestPlatform.ObjectModel/Logging/Events/TestRunMessageEventArgs.cs index ebb9cbffd2..72582df87d 100644 --- a/src/Microsoft.TestPlatform.ObjectModel/Logging/Events/TestRunMessageEventArgs.cs +++ b/src/Microsoft.TestPlatform.ObjectModel/Logging/Events/TestRunMessageEventArgs.cs @@ -16,8 +16,6 @@ namespace Microsoft.VisualStudio.TestPlatform.ObjectModel.Logging; [DataContract] public class TestRunMessageEventArgs : EventArgs { - #region Constructor - /// /// Initializes with the level and the message for the event. /// @@ -39,10 +37,6 @@ public TestRunMessageEventArgs(TestMessageLevel level, string message) Message = message; } - #endregion - - #region Properties - /// /// The message. /// @@ -55,5 +49,4 @@ public TestRunMessageEventArgs(TestMessageLevel level, string message) [DataMember] public TestMessageLevel Level { get; set; } - #endregion } diff --git a/src/Microsoft.TestPlatform.ObjectModel/Navigation/NativeMethods.cs b/src/Microsoft.TestPlatform.ObjectModel/Navigation/NativeMethods.cs index 3e4439d3a7..bdb1fd7f51 100644 --- a/src/Microsoft.TestPlatform.ObjectModel/Navigation/NativeMethods.cs +++ b/src/Microsoft.TestPlatform.ObjectModel/Navigation/NativeMethods.cs @@ -576,8 +576,6 @@ public static IDiaDataSource GetDiaSourceObject() return (comObject as IDiaDataSource); } - #region Private - [ComImport, ComVisible(false), Guid("00000001-0000-0000-C000-000000000046"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] private interface IClassFactory @@ -596,7 +594,6 @@ internal static extern object DllGetClassObject( [In, MarshalAs(UnmanagedType.LPStruct)] Guid rclsid, [In, MarshalAs(UnmanagedType.LPStruct)] Guid riid); - #endregion } /// diff --git a/src/Microsoft.TestPlatform.ObjectModel/RunSettings/RunConfiguration.cs b/src/Microsoft.TestPlatform.ObjectModel/RunSettings/RunConfiguration.cs index 8c18a3343f..18ed049720 100644 --- a/src/Microsoft.TestPlatform.ObjectModel/RunSettings/RunConfiguration.cs +++ b/src/Microsoft.TestPlatform.ObjectModel/RunSettings/RunConfiguration.cs @@ -17,8 +17,6 @@ namespace Microsoft.VisualStudio.TestPlatform.ObjectModel; /// public class RunConfiguration : TestRunSettings { - #region Private Fields - /// /// Platform architecture which rocksteady should use for discovery/execution /// @@ -69,10 +67,6 @@ public class RunConfiguration : TestRunSettings /// private bool _shouldCollectSourceInformation; - #endregion - - #region Constructor - /// /// Initializes a new instance of the class. /// @@ -98,10 +92,6 @@ public RunConfiguration() : base(Constants.RunConfigurationSettingsName) ExecutionThreadApartmentState = Constants.DefaultExecutionThreadApartmentState; } - #endregion - - #region Properties - /// /// Gets or sets the solution directory. /// @@ -448,8 +438,6 @@ public bool ResultsDirectorySet /// public string DotnetHostPath { get; private set; } - #endregion - #if !NETSTANDARD1_0 /// public override XmlElement ToXml() diff --git a/src/Microsoft.TestPlatform.ObjectModel/RunSettings/SettingsException.cs b/src/Microsoft.TestPlatform.ObjectModel/RunSettings/SettingsException.cs index 5e7a4ad4f8..9b827a8881 100644 --- a/src/Microsoft.TestPlatform.ObjectModel/RunSettings/SettingsException.cs +++ b/src/Microsoft.TestPlatform.ObjectModel/RunSettings/SettingsException.cs @@ -20,8 +20,6 @@ namespace Microsoft.VisualStudio.TestPlatform.ObjectModel; #endif public class SettingsException : Exception { - #region Constructors - /// /// Default Constructor /// @@ -58,5 +56,4 @@ protected SettingsException(SerializationInfo info, StreamingContext context) } #endif - #endregion } diff --git a/src/Microsoft.TestPlatform.ObjectModel/RunSettings/SettingsNameAttribute.cs b/src/Microsoft.TestPlatform.ObjectModel/RunSettings/SettingsNameAttribute.cs index 99f2adda1d..54ad71b9da 100644 --- a/src/Microsoft.TestPlatform.ObjectModel/RunSettings/SettingsNameAttribute.cs +++ b/src/Microsoft.TestPlatform.ObjectModel/RunSettings/SettingsNameAttribute.cs @@ -16,8 +16,6 @@ namespace Microsoft.VisualStudio.TestPlatform.ObjectModel; [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)] public sealed class SettingsNameAttribute : Attribute { - #region Constructor - /// /// Initializes with the name of the settings. /// @@ -32,14 +30,9 @@ public SettingsNameAttribute(string settingsName) SettingsName = settingsName; } - #endregion - - #region Properties - /// /// The name of the settings. /// public string SettingsName { get; private set; } - #endregion } diff --git a/src/Microsoft.TestPlatform.ObjectModel/RunSettings/TestRunSettings.cs b/src/Microsoft.TestPlatform.ObjectModel/RunSettings/TestRunSettings.cs index 10847bb68c..a0d696ef92 100644 --- a/src/Microsoft.TestPlatform.ObjectModel/RunSettings/TestRunSettings.cs +++ b/src/Microsoft.TestPlatform.ObjectModel/RunSettings/TestRunSettings.cs @@ -14,8 +14,6 @@ namespace Microsoft.VisualStudio.TestPlatform.ObjectModel; /// public abstract class TestRunSettings { - #region Constructor - /// /// Initializes with the name of the test case. /// @@ -27,10 +25,6 @@ protected TestRunSettings(string name) Name = name; } - #endregion - - #region Properties - /// /// Gets the name of the test settings. /// Do not put a private setter on this @@ -40,8 +34,6 @@ protected TestRunSettings(string name) /// public string Name { get; } - #endregion - #if !NETSTANDARD1_0 /// /// Converter the setting to be an XmlElement. diff --git a/src/Microsoft.TestPlatform.ObjectModel/TestCase.cs b/src/Microsoft.TestPlatform.ObjectModel/TestCase.cs index 45cb615ae2..9b9a9ad90f 100644 --- a/src/Microsoft.TestPlatform.ObjectModel/TestCase.cs +++ b/src/Microsoft.TestPlatform.ObjectModel/TestCase.cs @@ -25,8 +25,6 @@ public sealed class TestCase : TestObject private string _fullyQualifiedName; private string _source; - #region Constructor - /// /// Initializes a new instance of the class. /// @@ -59,10 +57,6 @@ public TestCase(string fullyQualifiedName, Uri executorUri, string source) Source = source; LineNumber = -1; } - #endregion - - #region Properties - /// /// LocalExtensionData which can be used by Adapter developers for local transfer of extended properties. /// Note that this data is available only for in-Proc execution, and may not be available for OutProc executors @@ -181,10 +175,6 @@ public override IEnumerable Properties } } - #endregion - - #region private methods - /// /// Creates a Id of TestCase /// @@ -235,10 +225,6 @@ private void SetPropertyAndResetId(TestProperty property, T value) _defaultId = Guid.Empty; } - #endregion - - #region Protected Methods - /// /// Return TestProperty's value /// @@ -303,10 +289,6 @@ protected override void ProtectedSetPropertyValue(TestProperty property, object base.ProtectedSetPropertyValue(property, value); } - #endregion - - #region ManagedName and ManagedType implementations - private static readonly TestProperty ManagedTypeProperty = TestProperty.Register("TestCase.ManagedType", "ManagedType", string.Empty, string.Empty, typeof(string), o => !string.IsNullOrWhiteSpace(o as string), TestPropertyAttributes.Hidden, typeof(TestCase)); private static readonly TestProperty ManagedMethodProperty = TestProperty.Register("TestCase.ManagedMethod", "ManagedMethod", string.Empty, string.Empty, typeof(string), o => !string.IsNullOrWhiteSpace(o as string), TestPropertyAttributes.Hidden, typeof(TestCase)); @@ -326,8 +308,6 @@ private string ManagedMethod private string GetFullyQualifiedName() => ContainsManagedMethodAndType ? $"{ManagedType}.{ManagedMethod}" : FullyQualifiedName; - #endregion - /// public override string ToString() => GetFullyQualifiedName(); } @@ -337,8 +317,6 @@ private string ManagedMethod /// public static class TestCaseProperties { - #region Private Constants - /// /// These are the core Test properties and may be available in commandline/TeamBuild to filter tests. /// These Property names should not be localized. @@ -351,8 +329,6 @@ public static class TestCaseProperties private const string FilePathLabel = "File Path"; private const string LineNumberLabel = "Line Number"; - #endregion - public static readonly TestProperty Id = TestProperty.Register("TestCase.Id", IdLabel, string.Empty, string.Empty, typeof(Guid), ValidateGuid, TestPropertyAttributes.Hidden, typeof(TestCase)); public static readonly TestProperty FullyQualifiedName = TestProperty.Register("TestCase.FullyQualifiedName", FullyQualifiedNameLabel, string.Empty, string.Empty, typeof(string), ValidateName, TestPropertyAttributes.Hidden, typeof(TestCase)); public static readonly TestProperty DisplayName = TestProperty.Register("TestCase.DisplayName", NameLabel, string.Empty, string.Empty, typeof(string), ValidateDisplay, TestPropertyAttributes.None, typeof(TestCase)); diff --git a/src/Microsoft.TestPlatform.ObjectModel/TestObject.cs b/src/Microsoft.TestPlatform.ObjectModel/TestObject.cs index eb151ba1e3..d7592a3d3e 100644 --- a/src/Microsoft.TestPlatform.ObjectModel/TestObject.cs +++ b/src/Microsoft.TestPlatform.ObjectModel/TestObject.cs @@ -19,8 +19,6 @@ namespace Microsoft.VisualStudio.TestPlatform.ObjectModel; [DataContract] public abstract class TestObject { - #region Fields - private static readonly CustomKeyValueConverter KeyValueConverter = new(); private static readonly CustomStringArrayConverter StringArrayConverter = new(); @@ -70,10 +68,6 @@ public IEnumerable> GetProperties() return _store; } - #endregion Fields - - #region Constructors - protected TestObject() { _store = new Dictionary(); @@ -101,10 +95,6 @@ public void CacheLazyValuesOnSerializing(StreamingContext context) } } - #endregion Constructors - - #region Properties - /// /// Returns the TestProperties currently specified in this TestObject. /// @@ -230,10 +220,6 @@ public void SetPropertyValue(TestProperty property, LazyPropertyValue valu ProtectedSetPropertyValue(property, objValue); } - #endregion Property Values - - #region Helpers - /// /// Return TestProperty's value /// @@ -361,8 +347,6 @@ private static T ConvertPropertyTo(TestProperty property, CultureInfo culture } } - #endregion Helpers - private TraitCollection _traits; public TraitCollection Traits diff --git a/src/Microsoft.TestPlatform.ObjectModel/TestProperty/TestProperty.cs b/src/Microsoft.TestPlatform.ObjectModel/TestProperty/TestProperty.cs index f1428cc8f9..151954b485 100644 --- a/src/Microsoft.TestPlatform.ObjectModel/TestProperty/TestProperty.cs +++ b/src/Microsoft.TestPlatform.ObjectModel/TestProperty/TestProperty.cs @@ -16,14 +16,8 @@ namespace Microsoft.VisualStudio.TestPlatform.ObjectModel; [DataContract] public class TestProperty : IEquatable { - #region Fields - private Type _valueType; - #endregion Fields - - #region Constructors - /// /// Initializes a new instance of the class. /// @@ -78,10 +72,6 @@ private TestProperty(string id, string label, string category, string descriptio _valueType = valueType; } - #endregion Constructors - - #region Properties - /// /// Gets or sets the Id for the property. /// @@ -125,10 +115,6 @@ private TestProperty(string id, string label, string category, string descriptio [DataMember] public string ValueType { get; set; } - #endregion Properties - - #region IEquatable - /// public override int GetHashCode() { @@ -147,10 +133,6 @@ public bool Equals(TestProperty other) return (other != null) && (Id == other.Id); } - #endregion IEquatable - - #region Methods - /// public override string ToString() { @@ -247,10 +229,6 @@ private Type GetType(string typeName) return type; } - #endregion Methods - - #region Static Fields - private static readonly Dictionary>> Properties = new(); #if FullCLR @@ -258,10 +236,6 @@ private Type GetType(string typeName) private static string s_windowsPhonePKT = "7cec85d7bea7798e"; #endif - #endregion Static Fields - - #region Static Methods - public static void ClearRegisteredProperties() { lock (Properties) @@ -375,8 +349,6 @@ public static bool TryUnregister(string id, out KeyValuePair /// Initializes a new instance of the class. /// @@ -37,10 +35,6 @@ public TestResult(TestCase testCase!!) EndTime = DateTimeOffset.UtcNow; } - #endregion - - #region Properties - /// /// Gets the test case that this result is for. /// @@ -118,10 +112,6 @@ public override IEnumerable Properties } } - #endregion - - #region Methods - /// public override string ToString() { @@ -178,10 +168,6 @@ public override string ToString() return result.ToString(); } - #endregion - - #region Protected Methods - /// /// Return TestProperty's value /// @@ -242,7 +228,6 @@ protected override void ProtectedSetPropertyValue(TestProperty property, object base.ProtectedSetPropertyValue(property, value); } - #endregion } /// diff --git a/src/Microsoft.TestPlatform.ObjectModel/Utilities/XmlReaderUtilities.cs b/src/Microsoft.TestPlatform.ObjectModel/Utilities/XmlReaderUtilities.cs index c38601dc0e..e4aca237ed 100644 --- a/src/Microsoft.TestPlatform.ObjectModel/Utilities/XmlReaderUtilities.cs +++ b/src/Microsoft.TestPlatform.ObjectModel/Utilities/XmlReaderUtilities.cs @@ -12,14 +12,8 @@ namespace Microsoft.VisualStudio.TestPlatform.ObjectModel.Utilities; /// public static class XmlReaderUtilities { - #region Constants - private const string RunSettingsRootNodeName = "RunSettings"; - #endregion - - #region Utility Methods - /// /// Reads up to the next Element in the document. /// @@ -69,5 +63,4 @@ public static void ReadToRootNode(XmlReader reader) } } - #endregion } diff --git a/src/Microsoft.TestPlatform.PlatformAbstractions/Interfaces/System/ThreadApartmentStateNotSupportedException.cs b/src/Microsoft.TestPlatform.PlatformAbstractions/Interfaces/System/ThreadApartmentStateNotSupportedException.cs index 59f623fb9a..474542be63 100644 --- a/src/Microsoft.TestPlatform.PlatformAbstractions/Interfaces/System/ThreadApartmentStateNotSupportedException.cs +++ b/src/Microsoft.TestPlatform.PlatformAbstractions/Interfaces/System/ThreadApartmentStateNotSupportedException.cs @@ -12,8 +12,6 @@ namespace Microsoft.VisualStudio.TestPlatform.PlatformAbstractions; /// public class ThreadApartmentStateNotSupportedException : Exception { - #region Constructors - /// /// Initializes a new instance of the class. /// Initializes with the message. @@ -44,6 +42,4 @@ public ThreadApartmentStateNotSupportedException(string message, Exception inner { } - #endregion - } diff --git a/src/Microsoft.TestPlatform.Utilities/CodeCoverageRunSettingsProcessor.cs b/src/Microsoft.TestPlatform.Utilities/CodeCoverageRunSettingsProcessor.cs index f3b702de73..4b642fe348 100644 --- a/src/Microsoft.TestPlatform.Utilities/CodeCoverageRunSettingsProcessor.cs +++ b/src/Microsoft.TestPlatform.Utilities/CodeCoverageRunSettingsProcessor.cs @@ -19,14 +19,10 @@ namespace Microsoft.VisualStudio.TestPlatform.Utilities; /// public class CodeCoverageRunSettingsProcessor { - #region Members /// /// Represents the default settings loaded as an . /// private readonly XmlNode _defaultSettingsRootNode; - #endregion - - #region Constructors & Helpers /// /// Constructs an object. /// @@ -36,9 +32,6 @@ public CodeCoverageRunSettingsProcessor(XmlNode defaultSettingsRootNode) { _defaultSettingsRootNode = defaultSettingsRootNode ?? throw new ArgumentNullException(nameof(defaultSettingsRootNode), "Default settings root node is null."); } - #endregion - - #region Public Interface /// /// Processes the current settings for the code coverage data collector. /// @@ -148,9 +141,6 @@ public XmlNode Process(XmlNode currentSettingsRootNode) return currentSettingsRootNode; } - #endregion - - #region Private Methods /// /// Selects the node from the current settings node using the given /// style path. If unable to select the requested node it adds @@ -305,5 +295,4 @@ private void MergeNodes(XmlNode currentNode, XmlNode defaultNode) currentNode.AppendChild(importedChild); } } - #endregion } diff --git a/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Friends.cs b/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Friends.cs index a9db03174f..caed48e700 100644 --- a/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Friends.cs +++ b/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Friends.cs @@ -3,13 +3,6 @@ using System.Runtime.CompilerServices; -#region Product Assemblies - -#endregion - -#region Test Assemblies - [assembly: InternalsVisibleTo("TranslationLayer.UnitTests, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")] [assembly: InternalsVisibleTo("Microsoft.TestPlatform.TestUtilities, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")] -#endregion diff --git a/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/TestSession.cs b/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/TestSession.cs index 8afa3b7ac8..5565379159 100644 --- a/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/TestSession.cs +++ b/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/TestSession.cs @@ -28,13 +28,9 @@ public class TestSession : ITestSession private readonly ITestSessionEventsHandler _eventsHandler; private readonly IVsTestConsoleWrapper _consoleWrapper; - #region Properties /// [Obsolete("This API is not final yet and is subject to changes.", false)] public TestSessionInfo TestSessionInfo { get; private set; } - #endregion - - #region Constructors /// /// Initializes a new instance of the class. /// @@ -82,9 +78,6 @@ protected virtual void Dispose(bool disposing) StopTestSession(); _disposed = true; } - #endregion - - #region ITestSession /// [Obsolete("This API is not final yet and is subject to changes.", false)] public void AbortTestRun() @@ -301,9 +294,6 @@ public bool StopTestSession( TestSessionInfo = null; } } - #endregion - - #region ITestSessionAsync /// [Obsolete("This API is not final yet and is subject to changes.", false)] public async Task DiscoverTestsAsync( @@ -501,5 +491,4 @@ public async Task StopTestSessionAsync( TestSessionInfo = null; } } - #endregion } diff --git a/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/VsTestConsoleProcessManager.cs b/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/VsTestConsoleProcessManager.cs index 4a0c7f8e4f..448cfd5a6a 100644 --- a/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/VsTestConsoleProcessManager.cs +++ b/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/VsTestConsoleProcessManager.cs @@ -27,8 +27,6 @@ namespace Microsoft.TestPlatform.VsTestConsole.TranslationLayer; /// internal class VsTestConsoleProcessManager : IProcessManager { - #region Private Members - /// /// Port number for communicating with Vstest CLI /// @@ -62,13 +60,9 @@ internal class VsTestConsoleProcessManager : IProcessManager internal IFileHelper FileHelper { get; set; } - #endregion - /// public event EventHandler ProcessExited; - #region Constructor - /// /// Creates an instance of VsTestConsoleProcessManager class. /// @@ -90,8 +84,6 @@ public VsTestConsoleProcessManager(string vstestConsolePath, string dotnetExePat _dotnetExePath = dotnetExePath; } - #endregion Constructor - /// /// Checks if the process has been initialized. /// diff --git a/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/VsTestConsoleRequestSender.cs b/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/VsTestConsoleRequestSender.cs index c704f788f4..f9a186a6df 100644 --- a/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/VsTestConsoleRequestSender.cs +++ b/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/VsTestConsoleRequestSender.cs @@ -53,8 +53,6 @@ internal class VsTestConsoleRequestSender : ITranslationLayerRequestSender /// private CancellationTokenSource _processExitCancellationTokenSource; - #region Constructor - /// /// Initializes a new instance of the class. /// @@ -83,10 +81,6 @@ internal VsTestConsoleRequestSender( _testPlatformEventSource = testPlatformEventSource; } - #endregion - - #region ITranslationLayerRequestSender - /// public int InitializeCommunication() { @@ -842,8 +836,6 @@ public void Dispose() _communicationManager?.StopServer(); } - #endregion - private bool HandShakeWithVsTestConsole() { var success = false; diff --git a/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/VsTestConsoleWrapper.cs b/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/VsTestConsoleWrapper.cs index a346f5f31f..b4ae54b202 100644 --- a/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/VsTestConsoleWrapper.cs +++ b/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/VsTestConsoleWrapper.cs @@ -34,8 +34,6 @@ namespace Microsoft.TestPlatform.VsTestConsole.TranslationLayer; /// public class VsTestConsoleWrapper : IVsTestConsoleWrapper { - #region Private Members - private readonly IProcessManager _vstestConsoleProcessManager; private readonly ITranslationLayerRequestSender _requestSender; @@ -56,10 +54,6 @@ public class VsTestConsoleWrapper : IVsTestConsoleWrapper private readonly ITestPlatformEventSource _testPlatformEventSource; - #endregion - - #region Constructor - /// /// Initializes a new instance of the class. /// @@ -142,10 +136,6 @@ internal VsTestConsoleWrapper( _sessionStarted = false; } - #endregion - - #region IVsTestConsoleWrapper - /// public void StartSession() { @@ -567,10 +557,6 @@ public void EndSession() _sessionStarted = false; } - #endregion - - #region IVsTestConsoleWrapperAsync - /// public async Task StartSessionAsync() { @@ -993,8 +979,6 @@ public Task ProcessTestRunAttachmentsAsync( CancellationToken cancellationToken) => ProcessTestRunAttachmentsAsync(attachments, Enumerable.Empty(), processingSettings, isLastBatch, collectMetrics, testSessionEventsHandler, cancellationToken); - #endregion - private void EnsureInitialized() { if (!_vstestConsoleProcessManager.IsProcessInitialized()) diff --git a/src/datacollector/Friends.cs b/src/datacollector/Friends.cs index e4f067129f..53247c63ea 100644 --- a/src/datacollector/Friends.cs +++ b/src/datacollector/Friends.cs @@ -3,9 +3,5 @@ using System.Runtime.CompilerServices; -#region Test Assemblies - [assembly: InternalsVisibleTo("datacollector.UnitTests, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")] [assembly: InternalsVisibleTo("DynamicProxyGenAssembly2, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7")] - -#endregion diff --git a/src/testhost.x86/Friends.cs b/src/testhost.x86/Friends.cs index 0c96abe6bd..7a90f6681a 100644 --- a/src/testhost.x86/Friends.cs +++ b/src/testhost.x86/Friends.cs @@ -3,12 +3,5 @@ using System.Runtime.CompilerServices; -#region Product Assemblies - -#endregion - -#region Test Assemblies - [assembly: InternalsVisibleTo("testhost.UnitTests, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")] -#endregion diff --git a/src/vstest.console/CommandLine/CommandArgumentPair.cs b/src/vstest.console/CommandLine/CommandArgumentPair.cs index 1a41d09b61..dce53f1593 100644 --- a/src/vstest.console/CommandLine/CommandArgumentPair.cs +++ b/src/vstest.console/CommandLine/CommandArgumentPair.cs @@ -16,17 +16,11 @@ namespace Microsoft.VisualStudio.TestPlatform.CommandLine; /// internal class CommandArgumentPair { - #region Constants - /// /// The separator. /// internal const string Separator = ":"; - #endregion - - #region Properties - /// /// The command portion of the input. /// @@ -37,10 +31,6 @@ internal class CommandArgumentPair /// public string Argument { get; private set; } - #endregion - - #region Constructor - /// /// Breaks the provided command line switch into the command and argument pair. /// @@ -75,10 +65,6 @@ public CommandArgumentPair(string command, string argument) Argument = argument; } - #endregion - - #region Private Methods - /// /// Parses the input into the command and argument parts. /// @@ -106,5 +92,4 @@ private void Parse(string input) } } - #endregion } diff --git a/src/vstest.console/CommandLine/CommandLineException.cs b/src/vstest.console/CommandLine/CommandLineException.cs index 498b300470..e86495e1b8 100644 --- a/src/vstest.console/CommandLine/CommandLineException.cs +++ b/src/vstest.console/CommandLine/CommandLineException.cs @@ -13,8 +13,6 @@ namespace Microsoft.VisualStudio.TestPlatform.CommandLine; /// public class CommandLineException : Exception { - #region Constructors - /// /// Creates a new CommandLineException /// @@ -41,5 +39,4 @@ public CommandLineException(string message, Exception innerException) { } - #endregion } diff --git a/src/vstest.console/CommandLine/CommandLineOptions.cs b/src/vstest.console/CommandLine/CommandLineOptions.cs index 26b119b513..443318c3f7 100644 --- a/src/vstest.console/CommandLine/CommandLineOptions.cs +++ b/src/vstest.console/CommandLine/CommandLineOptions.cs @@ -24,8 +24,6 @@ namespace Microsoft.VisualStudio.TestPlatform.CommandLine; /// internal class CommandLineOptions { - #region Constants/Readonly - /// /// The default batch size. /// @@ -46,10 +44,6 @@ internal class CommandLineOptions /// private readonly TimeSpan _defaultRetrievalTimeout = new(0, 0, 0, 1, 500); - #endregion - - #region PrivateMembers - private static CommandLineOptions s_instance; private List _sources = new(); @@ -58,8 +52,6 @@ internal class CommandLineOptions private Framework _frameworkVersion; - #endregion - /// /// Gets the instance. /// @@ -76,8 +68,6 @@ internal static CommandLineOptions Instance } } - #region Constructor - /// /// Default constructor. /// @@ -92,10 +82,6 @@ internal CommandLineOptions() #endif } - #endregion - - #region Properties - /// /// Specifies whether parallel execution is on or off. /// @@ -285,10 +271,6 @@ internal Framework TargetFrameworkVersion /// internal string TestSessionCorrelationId { get; set; } - #endregion - - #region Public Methods - /// /// Adds a source file to look for tests in. /// @@ -317,10 +299,6 @@ public void AddSource(string source) _sources = _sources.Union(matchingFiles).ToList(); } - #endregion - - #region Internal Methods - /// /// Resets the options. Clears the sources. /// @@ -329,5 +307,4 @@ internal void Reset() s_instance = null; } - #endregion } diff --git a/src/vstest.console/CommandLine/Executor.cs b/src/vstest.console/CommandLine/Executor.cs index fc32e2dbf4..44c1e5692b 100644 --- a/src/vstest.console/CommandLine/Executor.cs +++ b/src/vstest.console/CommandLine/Executor.cs @@ -53,8 +53,6 @@ internal class Executor private readonly ITestPlatformEventSource _testPlatformEventSource; private bool _showHelp; - #region Constructor - /// /// Default constructor. /// @@ -69,19 +67,11 @@ internal Executor(IOutput output, ITestPlatformEventSource testPlatformEventSour _showHelp = true; } - #endregion - - #region Properties - /// /// Instance to use for sending output. /// private IOutput Output { get; set; } - #endregion - - #region Methods - /// /// Performs the execution based on the arguments provided. /// @@ -186,10 +176,6 @@ internal int Execute(params string[] args) return exitCode; } - #endregion - - #region Private Methods - /// /// Get the list of argument processors for the arguments. /// @@ -496,5 +482,4 @@ private bool GetContentUsingFile(string fileName, out string contents) return false; } - #endregion } diff --git a/src/vstest.console/CommandLine/TestRunResultAggregator.cs b/src/vstest.console/CommandLine/TestRunResultAggregator.cs index 5017b911e1..47d6784a29 100644 --- a/src/vstest.console/CommandLine/TestRunResultAggregator.cs +++ b/src/vstest.console/CommandLine/TestRunResultAggregator.cs @@ -16,8 +16,6 @@ internal class TestRunResultAggregator { private static TestRunResultAggregator s_instance; - #region Constructor - /// /// Initializes the TestRunResultAggregator /// @@ -28,10 +26,6 @@ protected TestRunResultAggregator() Outcome = TestOutcome.Passed; } - #endregion - - #region Static Methods - /// /// Gets the instance of the test run result aggregator. /// @@ -49,19 +43,11 @@ public static TestRunResultAggregator Instance } } - #endregion - - #region Properties - /// /// The current test run outcome. /// public TestOutcome Outcome { get; private set; } - #endregion - - #region Event Handlers - /// /// Registers to receive events from the provided test run request. /// These events will then be broadcast to any registered loggers. @@ -130,5 +116,4 @@ private void TestRunMessageHandler(object sender, TestRunMessageEventArgs e) } } - #endregion } diff --git a/src/vstest.console/CommandLine/TestSourceException.cs b/src/vstest.console/CommandLine/TestSourceException.cs index 0fd8cd68f2..09dbd2411a 100644 --- a/src/vstest.console/CommandLine/TestSourceException.cs +++ b/src/vstest.console/CommandLine/TestSourceException.cs @@ -13,8 +13,6 @@ namespace Microsoft.VisualStudio.TestPlatform.CommandLine; /// public class TestSourceException : Exception { - #region Constructors - /// /// Creates a new TestSourceException /// @@ -41,5 +39,4 @@ public TestSourceException(string message, Exception innerException) { } - #endregion } diff --git a/src/vstest.console/Friends.cs b/src/vstest.console/Friends.cs index 9b2a48fabe..72d2a5f1ea 100644 --- a/src/vstest.console/Friends.cs +++ b/src/vstest.console/Friends.cs @@ -3,14 +3,7 @@ using System.Runtime.CompilerServices; -#region Product Assemblies - -#endregion - -#region Test Assemblies - [assembly: InternalsVisibleTo("vstest.console.UnitTests, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")] [assembly: InternalsVisibleTo("vstest.console.PlatformTests, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")] [assembly: InternalsVisibleTo("DynamicProxyGenAssembly2, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7")] -#endregion diff --git a/src/vstest.console/Internal/ConsoleLogger.cs b/src/vstest.console/Internal/ConsoleLogger.cs index 4f30b3881f..e68355b708 100644 --- a/src/vstest.console/Internal/ConsoleLogger.cs +++ b/src/vstest.console/Internal/ConsoleLogger.cs @@ -31,7 +31,6 @@ namespace Microsoft.VisualStudio.TestPlatform.CommandLine.Internal; [ExtensionUri(ExtensionUri)] internal class ConsoleLogger : ITestLoggerWithParameters { - #region Constants private const string TestMessageFormattingPrefix = " "; /// @@ -94,8 +93,6 @@ internal class ConsoleLogger : ITestLoggerWithParameters CommandLineResources.None.Length }.Max(); - #endregion - internal enum Verbosity { Quiet, @@ -104,8 +101,6 @@ internal enum Verbosity Detailed } - #region Fields - private bool _testRunHasErrorMessages; /// @@ -113,10 +108,6 @@ internal enum Verbosity /// private string _targetFramework; - #endregion - - #region Constructor - /// /// Default constructor. /// @@ -134,10 +125,6 @@ internal ConsoleLogger(IOutput output, IProgressIndicator progressIndicator, IFe _featureFlag = featureFlag; } - #endregion - - #region Properties - /// /// Gets instance of IOutput used for sending output. /// @@ -170,10 +157,6 @@ protected static IOutput Output /// private ConcurrentDictionary LeafTestResults { get; set; } - #endregion - - #region ITestLoggerWithParameters - /// /// Initializes the Test Logger. /// @@ -236,10 +219,6 @@ public void Initialize(TestLoggerEvents events, Dictionary param Initialize(events, String.Empty); } - #endregion - - #region Private Methods - /// /// Prints the timespan onto console. /// @@ -413,10 +392,6 @@ private Guid GetExecutionId(TestResult testResult) return executionId.Equals(Guid.Empty) ? Guid.NewGuid() : executionId; } - #endregion - - #region Event Handlers - /// /// Called when a test run start is received /// @@ -885,8 +860,6 @@ private void TestRunCompleteHandler(object sender, TestRunCompleteEventArgs e) } } } - #endregion - /// /// Raises test run warning occurred before console logger starts listening warning events. /// diff --git a/src/vstest.console/Processors/CLIRunSettingsArgumentProcessor.cs b/src/vstest.console/Processors/CLIRunSettingsArgumentProcessor.cs index 20ffa72ec6..76e776061a 100644 --- a/src/vstest.console/Processors/CLIRunSettingsArgumentProcessor.cs +++ b/src/vstest.console/Processors/CLIRunSettingsArgumentProcessor.cs @@ -23,15 +23,11 @@ namespace Microsoft.VisualStudio.TestPlatform.CommandLine.Processors; /// internal class CliRunSettingsArgumentProcessor : IArgumentProcessor { - #region Constants - /// /// The name of the command line argument that the PortArgumentExecutor handles. /// public const string CommandName = "--"; - #endregion - private Lazy _metadata; private Lazy _executor; diff --git a/src/vstest.console/Processors/CollectArgumentProcessor.cs b/src/vstest.console/Processors/CollectArgumentProcessor.cs index 4aa6de7eca..e7461b8059 100644 --- a/src/vstest.console/Processors/CollectArgumentProcessor.cs +++ b/src/vstest.console/Processors/CollectArgumentProcessor.cs @@ -29,15 +29,11 @@ namespace Microsoft.VisualStudio.TestPlatform.CommandLine.Processors; /// internal class CollectArgumentProcessor : IArgumentProcessor { - #region Constants - /// /// The name of command for enabling code coverage. /// public const string CommandName = "/Collect"; - #endregion - private Lazy _metadata; private Lazy _executor; diff --git a/src/vstest.console/Processors/DisableAutoFakesArgumentProcessor.cs b/src/vstest.console/Processors/DisableAutoFakesArgumentProcessor.cs index aaabcfc3eb..09a8d7913c 100644 --- a/src/vstest.console/Processors/DisableAutoFakesArgumentProcessor.cs +++ b/src/vstest.console/Processors/DisableAutoFakesArgumentProcessor.cs @@ -15,16 +15,12 @@ namespace Microsoft.VisualStudio.TestPlatform.CommandLine.Processors; /// internal class DisableAutoFakesArgumentProcessor : IArgumentProcessor { - #region Constants - public const string CommandName = "/DisableAutoFakes"; private Lazy _metadata; private Lazy _executor; - #endregion - public Lazy Executor { get @@ -62,15 +58,10 @@ internal class DisableAutoFakesArgumentExecutor : IArgumentExecutor { private readonly CommandLineOptions _commandLineOptions; - #region Constructors public DisableAutoFakesArgumentExecutor(CommandLineOptions commandLineOptions) { _commandLineOptions = commandLineOptions; } - #endregion - - #region IArgumentProcessor - /// /// Initializes with the argument that was provided with the command. /// @@ -102,5 +93,4 @@ public ArgumentProcessorResult Execute() return ArgumentProcessorResult.Success; } - #endregion } diff --git a/src/vstest.console/Processors/EnableBlameArgumentProcessor.cs b/src/vstest.console/Processors/EnableBlameArgumentProcessor.cs index 5fcef87fbb..15c6be8726 100644 --- a/src/vstest.console/Processors/EnableBlameArgumentProcessor.cs +++ b/src/vstest.console/Processors/EnableBlameArgumentProcessor.cs @@ -120,8 +120,6 @@ internal class EnableBlameArgumentExecutor : IArgumentExecutor /// private readonly IFileHelper _fileHelper; - #region Constructor - internal EnableBlameArgumentExecutor(IRunSettingsProvider runSettingsManager, IEnvironment environment, IFileHelper fileHelper) { _runSettingsManager = runSettingsManager; @@ -130,16 +128,8 @@ internal EnableBlameArgumentExecutor(IRunSettingsProvider runSettingsManager, IE _fileHelper = fileHelper; } - #endregion - - #region Properties - internal IOutput Output { get; set; } - #endregion - - #region IArgumentExecutor - /// /// Initializes with the argument that was provided with the command. /// @@ -383,5 +373,4 @@ private void AddCollectHangDumpNode(Dictionary parameters, XmlDo outernode.AppendChild(dumpNode); } - #endregion } diff --git a/src/vstest.console/Processors/EnableCodeCoverageArgumentProcessor.cs b/src/vstest.console/Processors/EnableCodeCoverageArgumentProcessor.cs index b4a6496bf9..0456d9bfb0 100644 --- a/src/vstest.console/Processors/EnableCodeCoverageArgumentProcessor.cs +++ b/src/vstest.console/Processors/EnableCodeCoverageArgumentProcessor.cs @@ -24,15 +24,11 @@ namespace Microsoft.VisualStudio.TestPlatform.CommandLine.Processors; /// internal class EnableCodeCoverageArgumentProcessor : IArgumentProcessor { - #region Constants - /// /// The name of command for enabling code coverage. /// public const string CommandName = "/EnableCodeCoverage"; - #endregion - private Lazy _metadata; private Lazy _executor; @@ -96,8 +92,6 @@ internal class EnableCodeCoverageArgumentProcessorCapabilities : BaseArgumentPro /// internal class EnableCodeCoverageArgumentExecutor : IArgumentExecutor { - #region private variables - private readonly IRunSettingsProvider _runSettingsManager; private readonly CommandLineOptions _commandLineOptions; private readonly IFileHelper _fileHelper; @@ -107,8 +101,6 @@ internal class EnableCodeCoverageArgumentExecutor : IArgumentExecutor private static readonly string XPathSeperator = "/"; private static readonly string[] NodeNames = new string[] { Constants.RunSettingsName, Constants.DataCollectionRunSettingsName, Constants.DataCollectorsSettingName, Constants.DataCollectorSettingName }; - #region Default CodeCoverage Settings String - private static readonly string CodeCoverageCollectorSettingsTemplate = @" " + Environment.NewLine + @" " + Environment.NewLine + @@ -187,10 +179,6 @@ internal class EnableCodeCoverageArgumentExecutor : IArgumentExecutor @" " + Environment.NewLine + @" "; - #endregion - - #endregion - internal EnableCodeCoverageArgumentExecutor(CommandLineOptions options, IRunSettingsProvider runSettingsManager, IFileHelper fileHelper) { _commandLineOptions = options; diff --git a/src/vstest.console/Processors/EnableDiagArgumentProcessor.cs b/src/vstest.console/Processors/EnableDiagArgumentProcessor.cs index 5ffe430631..09bd9b2f7b 100644 --- a/src/vstest.console/Processors/EnableDiagArgumentProcessor.cs +++ b/src/vstest.console/Processors/EnableDiagArgumentProcessor.cs @@ -114,8 +114,6 @@ internal class EnableDiagArgumentExecutor : IArgumentExecutor /// public const string TraceLevelParam = "tracelevel"; - #region Constructor - /// /// Default constructor. /// @@ -125,10 +123,6 @@ public EnableDiagArgumentExecutor(IFileHelper fileHelper) _fileHelper = fileHelper; } - #endregion - - #region IArgumentExecutor - /// /// Initializes with the argument that was provided with the command. /// @@ -254,5 +248,4 @@ private void CreateDirectoryIfNotExists(string filePath) } } - #endregion } diff --git a/src/vstest.console/Processors/EnableLoggerArgumentProcessor.cs b/src/vstest.console/Processors/EnableLoggerArgumentProcessor.cs index 1478c1decf..20a8623a8e 100644 --- a/src/vstest.console/Processors/EnableLoggerArgumentProcessor.cs +++ b/src/vstest.console/Processors/EnableLoggerArgumentProcessor.cs @@ -22,17 +22,11 @@ namespace Microsoft.VisualStudio.TestPlatform.CommandLine.Processors; /// internal class EnableLoggerArgumentProcessor : IArgumentProcessor { - #region Constants - /// /// The command name. /// public const string CommandName = "/Logger"; - #endregion - - #region Fields - private Lazy _metadata; private Lazy _executor; @@ -74,7 +68,6 @@ public Lazy Metadata } } - #endregion } internal class EnableLoggerArgumentProcessorCapabilities : BaseArgumentProcessorCapabilities @@ -121,8 +114,6 @@ internal class EnableLoggerArgumentExecutor : IArgumentExecutor { private readonly IRunSettingsProvider _runSettingsManager; - #region Constructors - /// /// Initializes a new instance of the class. /// @@ -132,10 +123,6 @@ public EnableLoggerArgumentExecutor(IRunSettingsProvider runSettingsManager) _runSettingsManager = runSettingsManager; } - #endregion - - #region IArgumentProcessor - /// /// Initializes with the argument that was provided with the command. /// @@ -180,5 +167,4 @@ public ArgumentProcessorResult Execute() return ArgumentProcessorResult.Success; } - #endregion } diff --git a/src/vstest.console/Processors/EnvironmentArgumentProcessor.cs b/src/vstest.console/Processors/EnvironmentArgumentProcessor.cs index 11065dbe6c..07b30cb054 100644 --- a/src/vstest.console/Processors/EnvironmentArgumentProcessor.cs +++ b/src/vstest.console/Processors/EnvironmentArgumentProcessor.cs @@ -21,7 +21,6 @@ namespace Microsoft.VisualStudio.TestPlatform.CommandLine.Processors; /// internal class EnvironmentArgumentProcessor : IArgumentProcessor { - #region Constants /// /// The short name of the command line argument that the EnvironmentArgumentProcessor handles. /// @@ -31,8 +30,6 @@ internal class EnvironmentArgumentProcessor : IArgumentProcessor /// The name of the command line argument that the EnvironmentArgumentProcessor handles. /// public const string CommandName = "/Environment"; - #endregion - private Lazy _metadata; private Lazy _executor; @@ -82,7 +79,6 @@ internal class ArgumentProcessorCapabilities : BaseArgumentProcessorCapabilities internal class ArgumentExecutor : IArgumentExecutor { - #region Fields /// /// Used when warning about overriden environment variables. /// @@ -97,8 +93,6 @@ internal class ArgumentExecutor : IArgumentExecutor /// Used when checking and forcing InIsolation mode. /// private readonly CommandLineOptions _commandLineOptions; - #endregion - public ArgumentExecutor(CommandLineOptions commandLineOptions, IRunSettingsProvider runSettingsProvider, IOutput output) { _commandLineOptions = commandLineOptions; diff --git a/src/vstest.console/Processors/FrameworkArgumentProcessor.cs b/src/vstest.console/Processors/FrameworkArgumentProcessor.cs index 20e50b68ee..19a49ea2ab 100644 --- a/src/vstest.console/Processors/FrameworkArgumentProcessor.cs +++ b/src/vstest.console/Processors/FrameworkArgumentProcessor.cs @@ -23,15 +23,11 @@ namespace Microsoft.VisualStudio.TestPlatform.CommandLine.Processors; /// internal class FrameworkArgumentProcessor : IArgumentProcessor { - #region Constants - /// /// The name of the command line argument that the OutputArgumentExecutor handles. /// public const string CommandName = "/Framework"; - #endregion - private Lazy _metadata; private Lazy _executor; @@ -94,8 +90,6 @@ internal class FrameworkArgumentProcessorCapabilities : BaseArgumentProcessorCap /// internal class FrameworkArgumentExecutor : IArgumentExecutor { - #region Fields - /// /// Used for getting sources. /// @@ -105,10 +99,6 @@ internal class FrameworkArgumentExecutor : IArgumentExecutor public const string RunSettingsPath = "RunConfiguration.TargetFrameworkVersion"; - #endregion - - #region Constructor - /// /// Default constructor. /// @@ -122,10 +112,6 @@ public FrameworkArgumentExecutor(CommandLineOptions options, IRunSettingsProvide _runSettingsManager = runSettingsManager; } - #endregion - - #region IArgumentExecutor - /// /// Initializes with the argument that was provided with the command. /// @@ -171,5 +157,4 @@ public ArgumentProcessorResult Execute() return ArgumentProcessorResult.Success; } - #endregion } diff --git a/src/vstest.console/Processors/HelpArgumentProcessor.cs b/src/vstest.console/Processors/HelpArgumentProcessor.cs index 1812fb37bc..4201036611 100644 --- a/src/vstest.console/Processors/HelpArgumentProcessor.cs +++ b/src/vstest.console/Processors/HelpArgumentProcessor.cs @@ -18,8 +18,6 @@ namespace Microsoft.VisualStudio.TestPlatform.CommandLine.Processors; // internal class HelpArgumentProcessor : IArgumentProcessor { - #region Constants - /// /// The name of the command line argument that the HelpArgumentExecutor handles. /// @@ -31,8 +29,6 @@ internal class HelpArgumentProcessor : IArgumentProcessor public const string ShortCommandName = "/?"; - #endregion - private Lazy _metadata; private Lazy _executor; @@ -98,8 +94,6 @@ internal class HelpArgumentProcessorCapabilities : BaseArgumentProcessorCapabili /// internal class HelpArgumentExecutor : IArgumentExecutor { - #region Constructor - /// /// Constructs the HelpArgumentExecutor /// @@ -108,19 +102,11 @@ public HelpArgumentExecutor() Output = ConsoleOutput.Instance; } - #endregion - - #region Properties - /// /// Gets the output object /// internal IOutput Output { get; set; } - #endregion - - #region IArgumentExecutor Members - public void Initialize(string argument) { } @@ -162,10 +148,6 @@ public ArgumentProcessorResult Execute() return ArgumentProcessorResult.Abort; } - #endregion - - #region Private Methods - /// /// Lookup the help description for the argument processor. /// @@ -203,5 +185,4 @@ private void OutputSection(string message) Output.WriteLine(string.Empty, OutputLevel.Information); } - #endregion } diff --git a/src/vstest.console/Processors/InIsolationArgumentProcessor.cs b/src/vstest.console/Processors/InIsolationArgumentProcessor.cs index 4f0722fd4b..8dde6a687b 100644 --- a/src/vstest.console/Processors/InIsolationArgumentProcessor.cs +++ b/src/vstest.console/Processors/InIsolationArgumentProcessor.cs @@ -21,12 +21,8 @@ namespace Microsoft.VisualStudio.TestPlatform.CommandLine.Processors; /// internal class InIsolationArgumentProcessor : IArgumentProcessor { - #region Constants - public const string CommandName = "/InIsolation"; - #endregion - private Lazy _metadata; private Lazy _executor; @@ -94,7 +90,6 @@ internal class InIsolationArgumentExecutor : IArgumentExecutor public const string RunSettingsPath = "RunConfiguration.InIsolation"; - #region Constructors /// /// Constructor /// @@ -106,10 +101,6 @@ public InIsolationArgumentExecutor(CommandLineOptions options, IRunSettingsProvi _commandLineOptions = options; _runSettingsManager = runSettingsManager; } - #endregion - - #region IArgumentProcessor - /// /// Initializes with the argument that was provided with the command. /// @@ -136,5 +127,4 @@ public ArgumentProcessorResult Execute() return ArgumentProcessorResult.Success; } - #endregion } diff --git a/src/vstest.console/Processors/ListExtensionsArgumentProcessor.cs b/src/vstest.console/Processors/ListExtensionsArgumentProcessor.cs index fe5be232f0..ebc30e6727 100644 --- a/src/vstest.console/Processors/ListExtensionsArgumentProcessor.cs +++ b/src/vstest.console/Processors/ListExtensionsArgumentProcessor.cs @@ -83,7 +83,6 @@ public Lazy Metadata } } -#region List discoverers /// /// Argument Executor for the "/ListDiscoverers" command line argument. /// @@ -118,9 +117,6 @@ public ArgumentProcessorResult Execute() return ArgumentProcessorResult.Success; } } -#endregion - -#region List executors /// /// Argument Executor for the "/ListExecutors" command line argument. /// @@ -154,9 +150,6 @@ public ArgumentProcessorResult Execute() return ArgumentProcessorResult.Success; } } -#endregion - -#region List loggers /// /// Argument Executor for the "/ListLoggers" command line argument. /// @@ -198,9 +191,6 @@ public void SendMessage(TestMessageLevel testMessageLevel, string message) } } } -#endregion - -#region List settings providers /// /// Argument Executor for the "/ListSettingsProviders" command line argument. /// @@ -234,4 +224,3 @@ public ArgumentProcessorResult Execute() return ArgumentProcessorResult.Success; } } -#endregion diff --git a/src/vstest.console/Processors/ListFullyQualifiedTestsArgumentProcessor.cs b/src/vstest.console/Processors/ListFullyQualifiedTestsArgumentProcessor.cs index c4ff43eea1..9ec0ef3674 100644 --- a/src/vstest.console/Processors/ListFullyQualifiedTestsArgumentProcessor.cs +++ b/src/vstest.console/Processors/ListFullyQualifiedTestsArgumentProcessor.cs @@ -29,15 +29,11 @@ namespace Microsoft.VisualStudio.TestPlatform.CommandLine.Processors; /// internal class ListFullyQualifiedTestsArgumentProcessor : IArgumentProcessor { - #region Constants - /// /// The name of the command line argument that the ListFullyQualifiedTestsArgumentProcessor handles. /// public const string CommandName = "/ListFullyQualifiedTests"; - #endregion - private Lazy _metadata; private Lazy _executor; @@ -102,8 +98,6 @@ internal class ListFullyQualifiedTestsArgumentProcessorCapabilities : BaseArgume /// internal class ListFullyQualifiedTestsArgumentExecutor : IArgumentExecutor { - #region Fields - /// /// Used for getting sources. /// @@ -139,10 +133,6 @@ internal class ListFullyQualifiedTestsArgumentExecutor : IArgumentExecutor /// private readonly List _discoveredTests = new(); - #endregion - - #region Constructor - /// /// Default constructor. /// @@ -180,10 +170,6 @@ internal ListFullyQualifiedTestsArgumentExecutor( _discoveryEventsRegistrar = new DiscoveryEventsRegistrar(output, _testCasefilter, _discoveredTests, _commandLineOptions); } - #endregion - - #region IArgumentExecutor - /// /// Initializes with the argument that was provided with the command. /// @@ -231,8 +217,6 @@ public ArgumentProcessorResult Execute() return ArgumentProcessorResult.Success; } - #endregion - private class DiscoveryEventsRegistrar : ITestDiscoveryEventsRegistrar { private readonly IOutput _output; diff --git a/src/vstest.console/Processors/ListTestsArgumentProcessor.cs b/src/vstest.console/Processors/ListTestsArgumentProcessor.cs index 9e14d30008..f6a3f6c57c 100644 --- a/src/vstest.console/Processors/ListTestsArgumentProcessor.cs +++ b/src/vstest.console/Processors/ListTestsArgumentProcessor.cs @@ -26,8 +26,6 @@ namespace Microsoft.VisualStudio.TestPlatform.CommandLine.Processors; /// internal class ListTestsArgumentProcessor : IArgumentProcessor { - #region Constants - /// /// The short name of the command line argument that the ListTestsArgumentExecutor handles. /// @@ -38,8 +36,6 @@ internal class ListTestsArgumentProcessor : IArgumentProcessor /// public const string CommandName = "/ListTests"; - #endregion - private Lazy _metadata; private Lazy _executor; @@ -110,8 +106,6 @@ internal class ListTestsArgumentProcessorCapabilities : BaseArgumentProcessorCap /// internal class ListTestsArgumentExecutor : IArgumentExecutor { - #region Fields - /// /// Used for getting sources. /// @@ -137,10 +131,6 @@ internal class ListTestsArgumentExecutor : IArgumentExecutor /// private readonly ITestDiscoveryEventsRegistrar _discoveryEventsRegistrar; - #endregion - - #region Constructor - /// /// Default constructor. /// @@ -177,10 +167,6 @@ internal ListTestsArgumentExecutor( _discoveryEventsRegistrar = new DiscoveryEventsRegistrar(output); } - #endregion - - #region IArgumentExecutor - /// /// Initializes with the argument that was provided with the command. /// @@ -222,8 +208,6 @@ public ArgumentProcessorResult Execute() return ArgumentProcessorResult.Success; } - #endregion - private class DiscoveryEventsRegistrar : ITestDiscoveryEventsRegistrar { private readonly IOutput _output; diff --git a/src/vstest.console/Processors/ListTestsTargetPathArgumentProcessor.cs b/src/vstest.console/Processors/ListTestsTargetPathArgumentProcessor.cs index e26fb4ccb7..827f45e08e 100644 --- a/src/vstest.console/Processors/ListTestsTargetPathArgumentProcessor.cs +++ b/src/vstest.console/Processors/ListTestsTargetPathArgumentProcessor.cs @@ -15,12 +15,8 @@ namespace Microsoft.VisualStudio.TestPlatform.CommandLine.Processors; /// internal class ListTestsTargetPathArgumentProcessor : IArgumentProcessor { - #region Constants - public const string CommandName = "/ListTestsTargetPath"; - #endregion - private Lazy _metadata; private Lazy _executor; @@ -76,17 +72,11 @@ internal class ListTestsTargetPathArgumentProcessorCapabilities : BaseArgumentPr internal class ListTestsTargetPathArgumentExecutor : IArgumentExecutor { - #region Fields - /// /// Used for getting sources. /// private readonly CommandLineOptions _commandLineOptions; - #endregion - - #region Constructor - /// /// Default constructor. /// @@ -98,10 +88,6 @@ public ListTestsTargetPathArgumentExecutor(CommandLineOptions options) Contract.Requires(options != null); _commandLineOptions = options; } - #endregion - - #region IArgumentExecutor - /// /// Initializes with the argument that was provided with the command. /// @@ -125,5 +111,4 @@ public ArgumentProcessorResult Execute() { return ArgumentProcessorResult.Success; } - #endregion } diff --git a/src/vstest.console/Processors/ParallelArgumentProcessor.cs b/src/vstest.console/Processors/ParallelArgumentProcessor.cs index 441d690356..09a09b2af2 100644 --- a/src/vstest.console/Processors/ParallelArgumentProcessor.cs +++ b/src/vstest.console/Processors/ParallelArgumentProcessor.cs @@ -22,12 +22,8 @@ namespace Microsoft.VisualStudio.TestPlatform.CommandLine.Processors; /// internal class ParallelArgumentProcessor : IArgumentProcessor { - #region Constants - public const string CommandName = "/Parallel"; - #endregion - private Lazy _metadata; private Lazy _executor; @@ -90,8 +86,6 @@ internal class ParallelArgumentProcessorCapabilities : BaseArgumentProcessorCapa /// internal class ParallelArgumentExecutor : IArgumentExecutor { - #region Fields - /// /// Used for getting sources. /// @@ -101,10 +95,6 @@ internal class ParallelArgumentExecutor : IArgumentExecutor public const string RunSettingsPath = "RunConfiguration.MaxCpuCount"; - #endregion - - #region Constructor - /// /// Default constructor. /// @@ -118,10 +108,6 @@ public ParallelArgumentExecutor(CommandLineOptions options, IRunSettingsProvider _runSettingsManager = runSettingsManager; } - #endregion - - #region IArgumentExecutor - /// /// Initializes with the argument that was provided with the command. /// @@ -148,5 +134,4 @@ public ArgumentProcessorResult Execute() return ArgumentProcessorResult.Success; } - #endregion } diff --git a/src/vstest.console/Processors/ParentProcessIdArgumentProcessor.cs b/src/vstest.console/Processors/ParentProcessIdArgumentProcessor.cs index c27707c1ae..46eb18613b 100644 --- a/src/vstest.console/Processors/ParentProcessIdArgumentProcessor.cs +++ b/src/vstest.console/Processors/ParentProcessIdArgumentProcessor.cs @@ -15,15 +15,11 @@ namespace Microsoft.VisualStudio.TestPlatform.CommandLine.Processors; /// internal class ParentProcessIdArgumentProcessor : IArgumentProcessor { - #region Constants - /// /// The name of the command line argument that the ParentProcessIdArgumentExecutor handles. /// public const string CommandName = "/ParentProcessId"; - #endregion - private Lazy _metadata; private Lazy _executor; @@ -87,17 +83,11 @@ internal class ParentProcessIdArgumentProcessorCapabilities : BaseArgumentProces /// internal class ParentProcessIdArgumentExecutor : IArgumentExecutor { - #region Fields - /// /// Used for getting sources. /// private readonly CommandLineOptions _commandLineOptions; - #endregion - - #region Constructor - /// /// Default constructor. /// @@ -110,8 +100,6 @@ public ParentProcessIdArgumentExecutor(CommandLineOptions options) _commandLineOptions = options; } - #endregion - /// /// Initializes with the argument that was provided with the command. /// diff --git a/src/vstest.console/Processors/PlatformArgumentProcessor.cs b/src/vstest.console/Processors/PlatformArgumentProcessor.cs index 95d30e7553..e86bc8130c 100644 --- a/src/vstest.console/Processors/PlatformArgumentProcessor.cs +++ b/src/vstest.console/Processors/PlatformArgumentProcessor.cs @@ -24,15 +24,11 @@ namespace Microsoft.VisualStudio.TestPlatform.CommandLine.Processors; /// internal class PlatformArgumentProcessor : IArgumentProcessor { - #region Constants - /// /// The name of the command line argument that the OutputArgumentExecutor handles. /// public const string CommandName = "/Platform"; - #endregion - private Lazy _metadata; private Lazy _executor; @@ -94,8 +90,6 @@ internal class PlatformArgumentProcessorCapabilities : BaseArgumentProcessorCapa /// internal class PlatformArgumentExecutor : IArgumentExecutor { - #region Fields - /// /// Used for getting sources. /// @@ -105,10 +99,6 @@ internal class PlatformArgumentExecutor : IArgumentExecutor public const string RunSettingsPath = "RunConfiguration.TargetPlatform"; - #endregion - - #region Constructor - /// /// Default constructor. /// @@ -122,10 +112,6 @@ public PlatformArgumentExecutor(CommandLineOptions options, IRunSettingsProvider _runSettingsManager = runSettingsManager; } - #endregion - - #region IArgumentExecutor - /// /// Initializes with the argument that was provided with the command. /// @@ -175,5 +161,4 @@ public ArgumentProcessorResult Execute() return ArgumentProcessorResult.Success; } - #endregion } diff --git a/src/vstest.console/Processors/PortArgumentProcessor.cs b/src/vstest.console/Processors/PortArgumentProcessor.cs index 8982b1eae1..7cd40036ac 100644 --- a/src/vstest.console/Processors/PortArgumentProcessor.cs +++ b/src/vstest.console/Processors/PortArgumentProcessor.cs @@ -26,15 +26,11 @@ namespace Microsoft.VisualStudio.TestPlatform.CommandLine.Processors; /// internal class PortArgumentProcessor : IArgumentProcessor { - #region Constants - /// /// The name of the command line argument that the PortArgumentExecutor handles. /// public const string CommandName = "/Port"; - #endregion - private Lazy _metadata; private Lazy _executor; @@ -98,8 +94,6 @@ internal class PortArgumentProcessorCapabilities : BaseArgumentProcessorCapabili /// internal class PortArgumentExecutor : IArgumentExecutor { - #region Fields - /// /// Used for getting sources. /// @@ -125,10 +119,6 @@ internal class PortArgumentExecutor : IArgumentExecutor /// private readonly IProcessHelper _processHelper; - #endregion - - #region Constructor - /// /// Default constructor. /// @@ -161,10 +151,6 @@ internal PortArgumentExecutor(CommandLineOptions options, ITestRequestManager te _processHelper = processHelper; } - #endregion - - #region IArgumentExecutor - /// /// Initializes with the argument that was provided with the command. /// @@ -199,8 +185,6 @@ public ArgumentProcessorResult Execute() return ArgumentProcessorResult.Success; } - #endregion - private static IDesignModeClient InitializeDesignMode(int parentProcessId, IProcessHelper processHelper) { if (parentProcessId > 0) diff --git a/src/vstest.console/Processors/ResponseFileArgumentProcessor.cs b/src/vstest.console/Processors/ResponseFileArgumentProcessor.cs index 38e14ce287..598b76b2f5 100644 --- a/src/vstest.console/Processors/ResponseFileArgumentProcessor.cs +++ b/src/vstest.console/Processors/ResponseFileArgumentProcessor.cs @@ -15,15 +15,11 @@ namespace Microsoft.VisualStudio.TestPlatform.CommandLine.Processors; /// internal class ResponseFileArgumentProcessor : IArgumentProcessor { - #region Constants - /// /// The name of the command line argument that the OutputArgumentExecutor handles. /// public const string CommandName = "@"; - #endregion - private Lazy _metadata; /// diff --git a/src/vstest.console/Processors/ResultsDirectoryArgumentProcessor.cs b/src/vstest.console/Processors/ResultsDirectoryArgumentProcessor.cs index d0cbb41098..994e629a7b 100644 --- a/src/vstest.console/Processors/ResultsDirectoryArgumentProcessor.cs +++ b/src/vstest.console/Processors/ResultsDirectoryArgumentProcessor.cs @@ -22,16 +22,12 @@ namespace Microsoft.VisualStudio.TestPlatform.CommandLine.Processors; /// internal class ResultsDirectoryArgumentProcessor : IArgumentProcessor { - #region Constants - /// /// The name of the command line argument that the ListTestsArgumentExecutor handles. /// public const string CommandName = "/ResultsDirectory"; private const string RunSettingsPath = "RunConfiguration.ResultsDirectory"; - #endregion - private Lazy _metadata; private Lazy _executor; @@ -97,8 +93,6 @@ internal class ResultsDirectoryArgumentProcessorCapabilities : BaseArgumentProce /// internal class ResultsDirectoryArgumentExecutor : IArgumentExecutor { - #region Fields - /// /// Used for getting sources. /// @@ -108,10 +102,6 @@ internal class ResultsDirectoryArgumentExecutor : IArgumentExecutor public const string RunSettingsPath = "RunConfiguration.ResultsDirectory"; - #endregion - - #region Constructor - /// /// Default constructor. /// @@ -126,10 +116,6 @@ public ResultsDirectoryArgumentExecutor(CommandLineOptions options, IRunSettings _runSettingsManager = runSettingsManager; } - #endregion - - #region IArgumentExecutor - /// /// Initializes with the argument that was provided with the command. /// @@ -169,5 +155,4 @@ public ArgumentProcessorResult Execute() return ArgumentProcessorResult.Success; } - #endregion } diff --git a/src/vstest.console/Processors/RunSettingsArgumentProcessor.cs b/src/vstest.console/Processors/RunSettingsArgumentProcessor.cs index 7ced9e7596..c16738eaab 100644 --- a/src/vstest.console/Processors/RunSettingsArgumentProcessor.cs +++ b/src/vstest.console/Processors/RunSettingsArgumentProcessor.cs @@ -25,15 +25,11 @@ namespace Microsoft.VisualStudio.TestPlatform.CommandLine.Processors; internal class RunSettingsArgumentProcessor : IArgumentProcessor { - #region Constants - /// /// The name of the command line argument that the PortArgumentExecutor handles. /// public const string CommandName = "/Settings"; - #endregion - private Lazy _metadata; private Lazy _executor; diff --git a/src/vstest.console/Processors/RunSpecificTestsArgumentProcessor.cs b/src/vstest.console/Processors/RunSpecificTestsArgumentProcessor.cs index 327a4bb3e5..d882efbb58 100644 --- a/src/vstest.console/Processors/RunSpecificTestsArgumentProcessor.cs +++ b/src/vstest.console/Processors/RunSpecificTestsArgumentProcessor.cs @@ -91,8 +91,6 @@ internal class RunSpecificTestsArgumentExecutor : IArgumentExecutor public const char SplitDelimiter = ','; public const char EscapeDelimiter = '\\'; - #region Fields - /// /// Used for getting sources. /// @@ -148,10 +146,6 @@ internal class RunSpecificTestsArgumentExecutor : IArgumentExecutor /// private readonly ITestRunEventsRegistrar _testRunEventsRegistrar; - #endregion - - #region Constructor - /// /// Default constructor. /// @@ -174,10 +168,6 @@ public RunSpecificTestsArgumentExecutor( _testRunEventsRegistrar = new TestRunRequestEventsRegistrar(Output, _commandLineOptions, artifactProcessingManager); } - #endregion - - #region IArgumentProcessor - /// /// Splits given the search strings and adds to selectTestNamesCollection. /// @@ -230,10 +220,6 @@ public ArgumentProcessorResult Execute() return treatNoTestsAsError && _selectedTestCases.Count == 0 ? ArgumentProcessorResult.Fail : ArgumentProcessorResult.Success; } - #endregion - - #region Private Methods - /// /// Discovers tests from the given sources and selects only specified tests. /// @@ -319,8 +305,6 @@ private void DiscoveryRequest_OnDiscoveredTests(object sender, DiscoveredTestsEv } } - #endregion - private class DiscoveryEventsRegistrar : ITestDiscoveryEventsRegistrar { private readonly EventHandler _discoveredTestsHandler; diff --git a/src/vstest.console/Processors/RunTestsArgumentProcessor.cs b/src/vstest.console/Processors/RunTestsArgumentProcessor.cs index 4379e49acc..f384f7914f 100644 --- a/src/vstest.console/Processors/RunTestsArgumentProcessor.cs +++ b/src/vstest.console/Processors/RunTestsArgumentProcessor.cs @@ -89,8 +89,6 @@ internal class RunTestsArgumentProcessorCapabilities : BaseArgumentProcessorCapa internal class RunTestsArgumentExecutor : IArgumentExecutor { - #region Fields - /// /// Used for getting tests to run. /// @@ -121,10 +119,6 @@ internal class RunTestsArgumentExecutor : IArgumentExecutor /// private static long s_numberOfExecutedTests; - #endregion - - #region Constructor - /// /// Default constructor. /// @@ -144,8 +138,6 @@ public RunTestsArgumentExecutor( _testRunEventsRegistrar = new TestRunRequestEventsRegistrar(Output, _commandLineOptions, artifactProcessingManager); } - #endregion - public void Initialize(string argument) { // Nothing to do. diff --git a/src/vstest.console/Processors/TestAdapterPathArgumentProcessor.cs b/src/vstest.console/Processors/TestAdapterPathArgumentProcessor.cs index cb73fd588d..b419ba5fa5 100644 --- a/src/vstest.console/Processors/TestAdapterPathArgumentProcessor.cs +++ b/src/vstest.console/Processors/TestAdapterPathArgumentProcessor.cs @@ -27,15 +27,11 @@ namespace Microsoft.VisualStudio.TestPlatform.CommandLine.Processors; /// internal class TestAdapterPathArgumentProcessor : IArgumentProcessor { - #region Constants - /// /// The name of the command line argument that the ListTestsArgumentExecutor handles. /// public const string CommandName = "/TestAdapterPath"; - #endregion - private Lazy _metadata; private Lazy _executor; @@ -82,8 +78,6 @@ internal class TestAdapterPathArgumentProcessorCapabilities : BaseArgumentProces /// internal class TestAdapterPathArgumentExecutor : IArgumentExecutor { - #region Fields - /// /// Used for getting sources. /// @@ -109,10 +103,6 @@ internal class TestAdapterPathArgumentExecutor : IArgumentExecutor /// private readonly char[] _argumentSeparators = new[] { ';' }; - #endregion - - #region Constructor - /// /// Default constructor. /// @@ -128,10 +118,6 @@ public TestAdapterPathArgumentExecutor(CommandLineOptions options, IRunSettingsP _fileHelper = fileHelper; } - #endregion - - #region IArgumentExecutor - /// /// Initializes with the argument that was provided with the command. /// @@ -215,5 +201,4 @@ public ArgumentProcessorResult Execute() return ArgumentProcessorResult.Success; } - #endregion } diff --git a/src/vstest.console/Processors/TestCaseFilterArgumentProcessor.cs b/src/vstest.console/Processors/TestCaseFilterArgumentProcessor.cs index 267354060a..4e589e4e8e 100644 --- a/src/vstest.console/Processors/TestCaseFilterArgumentProcessor.cs +++ b/src/vstest.console/Processors/TestCaseFilterArgumentProcessor.cs @@ -18,15 +18,11 @@ namespace Microsoft.VisualStudio.TestPlatform.CommandLine.Processors; /// internal class TestCaseFilterArgumentProcessor : IArgumentProcessor { - #region Constants - /// /// The name of the command line argument that the TestCaseFilterArgumentExecutor handles. /// public const string CommandName = "/TestCaseFilter"; - #endregion - private Lazy _metadata; private Lazy _executor; @@ -89,17 +85,11 @@ internal class TestCaseFilterArgumentProcessorCapabilities : BaseArgumentProcess /// internal class TestCaseFilterArgumentExecutor : IArgumentExecutor { - #region Fields - /// /// Used for getting sources. /// private readonly CommandLineOptions _commandLineOptions; - #endregion - - #region Constructor - /// /// Default constructor. /// @@ -111,10 +101,6 @@ public TestCaseFilterArgumentExecutor(CommandLineOptions options) Contract.Requires(options != null); _commandLineOptions = options; } - #endregion - - #region IArgumentExecutor - /// /// Initializes with the argument that was provided with the command. /// @@ -148,5 +134,4 @@ public ArgumentProcessorResult Execute() { return ArgumentProcessorResult.Success; } - #endregion } diff --git a/src/vstest.console/Processors/TestSourceArgumentProcessor.cs b/src/vstest.console/Processors/TestSourceArgumentProcessor.cs index 88066760aa..06af80fd71 100644 --- a/src/vstest.console/Processors/TestSourceArgumentProcessor.cs +++ b/src/vstest.console/Processors/TestSourceArgumentProcessor.cs @@ -15,15 +15,11 @@ namespace Microsoft.VisualStudio.TestPlatform.CommandLine.Processors; /// internal class TestSourceArgumentProcessor : IArgumentProcessor { - #region Constants - /// /// The command name. /// public const string CommandName = "/TestSource"; - #endregion - private Lazy _metadata; private Lazy _executor; @@ -81,17 +77,11 @@ internal class TestSourceArgumentProcessorCapabilities : BaseArgumentProcessorCa /// internal class TestSourceArgumentExecutor : IArgumentExecutor { - #region Fields - /// /// Used for adding sources to the test manager. /// private readonly CommandLineOptions _testSources; - #endregion - - #region Constructor - /// /// Default constructor. /// @@ -104,10 +94,6 @@ public TestSourceArgumentExecutor(CommandLineOptions testSources) _testSources = testSources; } - #endregion - - #region IArgumentExecutor - /// /// Initializes with the argument that was provided with the command. /// @@ -130,6 +116,4 @@ public ArgumentProcessorResult Execute() return ArgumentProcessorResult.Success; } - #endregion - } diff --git a/src/vstest.console/Processors/UseVsixExtensionsArgumentProcessor.cs b/src/vstest.console/Processors/UseVsixExtensionsArgumentProcessor.cs index 38ea5c37e8..4822e0cdca 100644 --- a/src/vstest.console/Processors/UseVsixExtensionsArgumentProcessor.cs +++ b/src/vstest.console/Processors/UseVsixExtensionsArgumentProcessor.cs @@ -21,15 +21,11 @@ namespace Microsoft.VisualStudio.TestPlatform.CommandLine.Processors; /// internal class UseVsixExtensionsArgumentProcessor : IArgumentProcessor { - #region Constants - /// /// The name of command /// public const string CommandName = "/UseVsixExtensions"; - #endregion - private Lazy _metadata; private Lazy _executor; diff --git a/src/vstest.console/Processors/Utilities/ArgumentProcessorFactory.cs b/src/vstest.console/Processors/Utilities/ArgumentProcessorFactory.cs index 6f7df661b5..b99afa6182 100644 --- a/src/vstest.console/Processors/Utilities/ArgumentProcessorFactory.cs +++ b/src/vstest.console/Processors/Utilities/ArgumentProcessorFactory.cs @@ -19,8 +19,6 @@ namespace Microsoft.VisualStudio.TestPlatform.CommandLine.Processors; /// internal class ArgumentProcessorFactory { - #region Constants - /// /// The command starter. /// @@ -31,20 +29,12 @@ internal class ArgumentProcessorFactory /// internal const string XplatCommandStarter = "-"; - #endregion - - #region Fields - /// /// Available argument processors. /// private Dictionary _commandToProcessorMap; private Dictionary _specialCommandToProcessorMap; - #endregion - - #region Constructor - /// Initializes the argument processor factory. /// /// @@ -62,10 +52,6 @@ protected ArgumentProcessorFactory(IEnumerable argumentProce AllArgumentProcessors = argumentProcessors; } - #endregion - - #region Static Methods - /// /// Creates ArgumentProcessorFactory. /// @@ -88,10 +74,6 @@ internal static ArgumentProcessorFactory Create(IFeatureFlag featureFlag = null) return new ArgumentProcessorFactory(defaultArgumentProcessor); } - #endregion - - #region Properties - /// /// Returns all of the available argument processors. /// @@ -131,10 +113,6 @@ internal Dictionary SpecialCommandToProcessorMap } } - #endregion - - #region Public Methods - /// /// Creates the argument processor associated with the provided command line argument. /// The Lazy that is returned will initialize the underlying argument processor when it is first accessed. @@ -221,10 +199,6 @@ public IEnumerable GetArgumentProcessorsToAlwaysExecute() .Where(lazyProcessor => lazyProcessor.Metadata.Value.IsSpecialCommand && lazyProcessor.Metadata.Value.AlwaysExecute); } - #endregion - - #region Private Methods - private static IList DefaultArgumentProcessors => new List { new HelpArgumentProcessor(), new TestSourceArgumentProcessor(), @@ -380,5 +354,4 @@ private static IArgumentProcessor WrapLazyProcessorToInitializeOnInstantiation( return processor; } - #endregion } diff --git a/src/vstest.console/TestPlatformHelpers/TestRequestManager.cs b/src/vstest.console/TestPlatformHelpers/TestRequestManager.cs index c6a636f798..9187d0ee84 100644 --- a/src/vstest.console/TestPlatformHelpers/TestRequestManager.cs +++ b/src/vstest.console/TestPlatformHelpers/TestRequestManager.cs @@ -81,8 +81,6 @@ internal class TestRequestManager : ITestRequestManager /// private CancellationTokenSource _currentAttachmentsProcessingCancellationTokenSource; - #region Constructor - /// /// Initializes a new instance of the class. /// @@ -121,8 +119,6 @@ internal TestRequestManager( _attachmentsProcessingManager = attachmentsProcessingManager; } - #endregion - /// /// Gets the test request manager instance. /// @@ -139,8 +135,6 @@ public static ITestRequestManager Instance } } - #region ITestRequestManager - /// public void InitializeExtensions( IEnumerable pathToAdditionalExtensions, @@ -588,8 +582,6 @@ public void CancelTestRunAttachmentsProcessing() _currentAttachmentsProcessingCancellationTokenSource?.Cancel(); } - #endregion - public void Dispose() { Dispose(true); diff --git a/test/Microsoft.TestPlatform.AcceptanceTests/RunsettingsTests.cs b/test/Microsoft.TestPlatform.AcceptanceTests/RunsettingsTests.cs index 57900e0bf3..de6e4953a9 100644 --- a/test/Microsoft.TestPlatform.AcceptanceTests/RunsettingsTests.cs +++ b/test/Microsoft.TestPlatform.AcceptanceTests/RunsettingsTests.cs @@ -17,7 +17,6 @@ namespace Microsoft.TestPlatform.AcceptanceTests; [TestCategory("Windows-Review")] public class RunsettingsTests : AcceptanceTestBase { - #region Runsettings precedence tests /// /// Command line run settings should have high precedence among settings file, cli runsettings and cli switches /// @@ -115,8 +114,6 @@ public void CommandLineSwitchesShouldWinBetweenSettingsFileAndCommandLineSwitche RunTestWithRunSettings(runConfigurationDictionary, null, additionalArgs, testhostProcessName, expectedNumOfProcessCreated); } - #endregion - [TestMethod] [NetFullTargetFrameworkDataSource] [NetCoreTargetFrameworkDataSource] @@ -258,8 +255,6 @@ public void TestAdapterPathFromRunSettings(RunnerInfo runnerInfo) ValidateSummaryStatus(1, 1, 1); } - #region LegacySettings Tests - [TestMethod] [TestCategory("Windows-Review")] [NetFullTargetFrameworkDataSource(inIsolation: true, useCoreRunner: false)] @@ -443,10 +438,6 @@ public void LegacySettingsAssemblyResolution(RunnerInfo runnerInfo) ValidateSummaryStatus(1, 0, 0); } - #endregion - - #region RunSettings With EnvironmentVariables Settings Tests - [TestMethod] [NetFullTargetFrameworkDataSource] [NetCoreTargetFrameworkDataSource] @@ -476,9 +467,6 @@ public void EnvironmentVariablesSettingsShouldSetEnvironmentVariables(RunnerInfo ValidateSummaryStatus(1, 0, 0); } - #endregion - - #region RunSettings defined in project file /// /// RunSettingsFilePath can be specified in .csproj and should be honored by `dotnet test`, this test /// checks that the settings were honored by translating an inconclusive test to failed "result", instead of the default "skipped". @@ -509,8 +497,6 @@ public void RunSettingsAreLoadedFromProject(RunnerInfo runnerInfo) ValidateSummaryStatus(0, 0, 1); } - #endregion - private string GetRunsettingsFilePath(Dictionary runConfigurationDictionary, TempDirectory tempDirectory) { var runsettingsPath = Path.Combine(tempDirectory.Path, "test_" + Guid.NewGuid() + ".runsettings"); diff --git a/test/Microsoft.TestPlatform.AdapterUtilities.UnitTests/ManagedNameUtilities/ManagedNameRoundTripTests.cs b/test/Microsoft.TestPlatform.AdapterUtilities.UnitTests/ManagedNameUtilities/ManagedNameRoundTripTests.cs index a965cdc248..5b16493083 100644 --- a/test/Microsoft.TestPlatform.AdapterUtilities.UnitTests/ManagedNameUtilities/ManagedNameRoundTripTests.cs +++ b/test/Microsoft.TestPlatform.AdapterUtilities.UnitTests/ManagedNameUtilities/ManagedNameRoundTripTests.cs @@ -821,7 +821,6 @@ public void Overloads18() managedMethodName: "Overload0`1(System.Tuple`1>>)"); } - #region Helpers private void VerifyRoundTrip( MethodInfo methodInfo, INamedTypeSymbol containingTypeSymbol, @@ -935,5 +934,4 @@ private void VerifyRoundTripFromName( // Assert.AreEqual(fullTypeName, roundTrippedFullTypeName); // Assert.AreEqual(fullMethodName, roundTrippedFullMethodName); // } - #endregion } diff --git a/test/Microsoft.TestPlatform.Common.UnitTests/ExtensionFramework/TestDiscoveryExtensionManagerTests.cs b/test/Microsoft.TestPlatform.Common.UnitTests/ExtensionFramework/TestDiscoveryExtensionManagerTests.cs index 96838f7973..6073e3f2f1 100644 --- a/test/Microsoft.TestPlatform.Common.UnitTests/ExtensionFramework/TestDiscoveryExtensionManagerTests.cs +++ b/test/Microsoft.TestPlatform.Common.UnitTests/ExtensionFramework/TestDiscoveryExtensionManagerTests.cs @@ -57,8 +57,6 @@ public void GetDiscoveryExtensionManagerShouldReturnADiscoveryManagerWithExtensi Assert.IsTrue(extensionManager.Discoverers.Any()); } - #region LoadAndInitialize tests - [TestMethod] public void LoadAndInitializeShouldInitializeAllExtensions() { @@ -74,7 +72,6 @@ public void LoadAndInitializeShouldInitializeAllExtensions() } } - #endregion } [TestClass] diff --git a/test/Microsoft.TestPlatform.Common.UnitTests/ExtensionFramework/TestExecutorExtensionManagerTests.cs b/test/Microsoft.TestPlatform.Common.UnitTests/ExtensionFramework/TestExecutorExtensionManagerTests.cs index 0ef5ab768a..4df1c73b67 100644 --- a/test/Microsoft.TestPlatform.Common.UnitTests/ExtensionFramework/TestExecutorExtensionManagerTests.cs +++ b/test/Microsoft.TestPlatform.Common.UnitTests/ExtensionFramework/TestExecutorExtensionManagerTests.cs @@ -55,8 +55,6 @@ public void GetExecutorExtensionManagerShouldReturnAnExecutionManagerWithExtensi Assert.IsTrue(extensionManager.TestExtensions.Any()); } - #region LoadAndInitialize tests - [TestMethod] public void LoadAndInitializeShouldInitializeAllExtensions() { @@ -72,7 +70,6 @@ public void LoadAndInitializeShouldInitializeAllExtensions() } } - #endregion } [TestClass] diff --git a/test/Microsoft.TestPlatform.Common.UnitTests/ExtensionFramework/TestPluginCacheTests.cs b/test/Microsoft.TestPlatform.Common.UnitTests/ExtensionFramework/TestPluginCacheTests.cs index 9e21547c58..a48a075bf8 100644 --- a/test/Microsoft.TestPlatform.Common.UnitTests/ExtensionFramework/TestPluginCacheTests.cs +++ b/test/Microsoft.TestPlatform.Common.UnitTests/ExtensionFramework/TestPluginCacheTests.cs @@ -38,8 +38,6 @@ public TestPluginCacheTests() _mockFileHelper.Setup(fh => fh.DirectoryExists(It.IsAny())).Returns(true); } - #region Properties tests - [TestMethod] public void InstanceShouldNotReturnANull() { @@ -52,10 +50,6 @@ public void TestExtensionsShouldBeNullByDefault() Assert.IsNull(TestPluginCache.Instance.TestExtensions); } - #endregion - - #region UpdateAdditionalExtensions tests - [TestMethod] public void UpdateAdditionalExtensionsShouldNotThrowIfExtensionPathIsNull() { @@ -126,10 +120,6 @@ public void UpdateAdditionalExtensionsShouldResetExtensionsDiscoveredFlag() { } - #endregion - - #region ClearExtensions - [TestMethod] public void ClearExtensionsShouldClearPathToExtensions() { @@ -140,10 +130,6 @@ public void ClearExtensionsShouldClearPathToExtensions() Assert.AreEqual(0, TestPluginCache.Instance.GetExtensionPaths(string.Empty).Count); } - #endregion - - #region GetExtensionPaths - [TestMethod] public void GetExtensionPathsShouldConsolidateAllExtensions() { @@ -201,10 +187,6 @@ public void GetExtensionPathsShouldNotSkipDefaultExtensionsIfSetFalse() InvokeGetExtensionPaths(expectedExtensions, false); } - #endregion - - #region GetDefaultResolutionPaths tests - [TestMethod] public void GetDefaultResolutionPathsShouldReturnCurrentDirectoryByDefault() { @@ -255,10 +237,6 @@ public void GetDefaultResolutionPathsShouldReturnDirectoryFromDefaultExtensionsP Assert.IsTrue(resolutionPaths.Contains(Path.GetDirectoryName(defaultExtensionsFile))); } - #endregion - - #region GetResolutionPaths tests - [TestMethod] public void GetResolutionPathsShouldThrowIfExtensionAssemblyIsNull() { @@ -289,10 +267,6 @@ public void GetResolutionPathsShouldNotHaveDuplicatePathsIfExtensionIsInSameDire CollectionAssert.AreEqual(expectedPaths, resolutionPaths.ToList()); } - #endregion - - #region GetTestExtensions tests - [TestMethod] public void GetTestExtensionsShouldReturnExtensionsInAssembly() { @@ -340,10 +314,6 @@ public void GetTestExtensionsShouldShouldThrowIfDiscovererThrows() Assert.ThrowsException(() => _testablePluginCache.GetTestExtensions(extensionAssembly)); } - #endregion - - #region DiscoverTestExtensions tests - [TestMethod] public void DiscoverTestExtensionsShouldDiscoverExtensionsFromExtensionsFolder() { @@ -368,8 +338,6 @@ public void DiscoverTestExtensionsShouldSetCachedBoolToTrue() Assert.IsTrue(TestPluginCache.Instance.TestExtensions.AreTestExtensionsCached()); } - #endregion - private void InvokeGetExtensionPaths(List expectedExtensions, bool skipDefaultExtensions) { TestPluginCache.Instance.UpdateExtensions(new[] { @"filter.dll", @"other.dll" }, false); diff --git a/test/Microsoft.TestPlatform.Common.UnitTests/ExtensionFramework/TestPluginDiscovererTests.cs b/test/Microsoft.TestPlatform.Common.UnitTests/ExtensionFramework/TestPluginDiscovererTests.cs index 678e57e317..538aa25eca 100644 --- a/test/Microsoft.TestPlatform.Common.UnitTests/ExtensionFramework/TestPluginDiscovererTests.cs +++ b/test/Microsoft.TestPlatform.Common.UnitTests/ExtensionFramework/TestPluginDiscovererTests.cs @@ -146,10 +146,6 @@ public void GetTestExtensionsInformationShouldNotAbortOnFaultyExtensions() Assert.That.DoesNotThrow(() => _testPluginDiscoverer.GetTestExtensionsInformation(pathToExtensions)); } - #region Implementations - - #region Discoverers - private abstract class AbstractTestDiscoverer : ITestDiscoverer { public void DiscoverTests(IEnumerable sources, IDiscoveryContext discoveryContext, IMessageLogger logger, ITestCaseDiscoverySink discoverySink) @@ -174,10 +170,6 @@ public void DiscoverTests(IEnumerable sources, IDiscoveryContext discove } } - #endregion - - #region Executors - [ExtensionUri("ValidExecutor")] private class ValidExecutor : ITestExecutor { @@ -235,10 +227,6 @@ public void RunTests(IEnumerable tests, IRunContext runContext, IFrame } } - #endregion - - #region Loggers - [ExtensionUri("csv")] private class ValidLogger : ITestLogger { @@ -266,10 +254,6 @@ public void Initialize(TestLoggerEvents events, string testRunDirectory) } } - #endregion - - #region Settings Providers - [SettingsName("ValidSettingsProvider")] private class ValidSettingsProvider : ISettingsProvider { @@ -297,10 +281,6 @@ public void Load(XmlReader reader) } } - #endregion - - #region DataCollectors - public class InvalidDataCollector : DataCollector { public override void Initialize( @@ -351,8 +331,6 @@ public Task> ProcessAttachmentSetsAsync(XmlElement co throw new NotImplementedException(); } } - #endregion - internal class FaultyTestExecutorPluginInformation : TestExtensionPluginInformation { /// @@ -364,5 +342,4 @@ public FaultyTestExecutorPluginInformation(Type type) : base(type) throw new Exception(); } } - #endregion } diff --git a/test/Microsoft.TestPlatform.Common.UnitTests/ExtensionFramework/TestPluginManagerTests.cs b/test/Microsoft.TestPlatform.Common.UnitTests/ExtensionFramework/TestPluginManagerTests.cs index 7f010866ac..7465761b61 100644 --- a/test/Microsoft.TestPlatform.Common.UnitTests/ExtensionFramework/TestPluginManagerTests.cs +++ b/test/Microsoft.TestPlatform.Common.UnitTests/ExtensionFramework/TestPluginManagerTests.cs @@ -120,8 +120,6 @@ public void GetTestExtensionsForAnExtensionAssemblyShouldReturnExtensionsInThatA Assert.IsTrue(testExtensions.Any()); } - #region Implementations - private abstract class AbstractDummyLogger : ITestLogger { public void Initialize(TestLoggerEvents events, string testRunDirectory) @@ -153,5 +151,4 @@ public void RunTests(IEnumerable tests, IRunContext runContext, IFrame } } - #endregion } diff --git a/test/Microsoft.TestPlatform.Common.UnitTests/ExtensionFramework/Utilities/LazyExtensionTests.cs b/test/Microsoft.TestPlatform.Common.UnitTests/ExtensionFramework/Utilities/LazyExtensionTests.cs index ad1fba3d87..9927e83745 100644 --- a/test/Microsoft.TestPlatform.Common.UnitTests/ExtensionFramework/Utilities/LazyExtensionTests.cs +++ b/test/Microsoft.TestPlatform.Common.UnitTests/ExtensionFramework/Utilities/LazyExtensionTests.cs @@ -23,8 +23,6 @@ namespace TestPlatform.Common.UnitTests.ExtensionFramework.Utilities; [TestClass] public class LazyExtensionTests { - #region Value tests - [TestMethod] public void ValueShouldCreateExtensionViaTheCallback() { @@ -70,10 +68,6 @@ public void ValueShouldNotCreateExtensionIfAlreadyCreated() Assert.AreEqual(1, numberOfTimesExtensionCreated); } - #endregion - - #region metadata tests - [TestMethod] public void MetadataShouldReturnMetadataSpecified() { @@ -104,10 +98,6 @@ public void MetadataShouldCreateMetadataFromMetadataType() Assert.AreEqual(AssemblyType.Native, (metadata as ITestDiscovererCapabilities).AssemblyType); } - #endregion - - #region Implementation - private class DummyDiscovererCapability : ITestDiscovererCapabilities { public IEnumerable FileExtension @@ -147,5 +137,4 @@ public void DiscoverTests(IEnumerable sources, IDiscoveryContext discove } } - #endregion } diff --git a/test/Microsoft.TestPlatform.Common.UnitTests/ExtensionFramework/Utilities/TestDiscovererPluginInformationTests.cs b/test/Microsoft.TestPlatform.Common.UnitTests/ExtensionFramework/Utilities/TestDiscovererPluginInformationTests.cs index 2c0d409ec8..7e3e3d1f2d 100644 --- a/test/Microsoft.TestPlatform.Common.UnitTests/ExtensionFramework/Utilities/TestDiscovererPluginInformationTests.cs +++ b/test/Microsoft.TestPlatform.Common.UnitTests/ExtensionFramework/Utilities/TestDiscovererPluginInformationTests.cs @@ -134,8 +134,6 @@ public void MetadataShouldReturnFileExtensionsAndDefaultExecutorUriAndAssemblyTy } } -#region Implementation - public class DummyTestDiscovererWithNoFileExtensions { } @@ -194,5 +192,3 @@ public class DummyTestDiscovererWithOneFileExtensions public class DummyTestDiscovererWithTwoFileExtensions { } - -#endregion diff --git a/test/Microsoft.TestPlatform.Common.UnitTests/ExtensionFramework/Utilities/TestExtensionPluginInformationTests.cs b/test/Microsoft.TestPlatform.Common.UnitTests/ExtensionFramework/Utilities/TestExtensionPluginInformationTests.cs index d197ad2916..b8bf802c40 100644 --- a/test/Microsoft.TestPlatform.Common.UnitTests/ExtensionFramework/Utilities/TestExtensionPluginInformationTests.cs +++ b/test/Microsoft.TestPlatform.Common.UnitTests/ExtensionFramework/Utilities/TestExtensionPluginInformationTests.cs @@ -56,8 +56,6 @@ public void MetadataShouldReturnExtensionUri() CollectionAssert.AreEqual(new object[] { DefaultExtensionUri }, _testPluginInformation.Metadata.ToArray()); } - #region Implementation - private class TestableTestExtensionPluginInformation : TestExtensionPluginInformation { public TestableTestExtensionPluginInformation(Type testExtensionType) : base(testExtensionType) @@ -74,5 +72,4 @@ private class DummyTestExtensionWithExtensionUri { } - #endregion } diff --git a/test/Microsoft.TestPlatform.Common.UnitTests/ExtensionFramework/Utilities/TestLoggerPluginInformationTests.cs b/test/Microsoft.TestPlatform.Common.UnitTests/ExtensionFramework/Utilities/TestLoggerPluginInformationTests.cs index d9bc6d51ce..c3729d9537 100644 --- a/test/Microsoft.TestPlatform.Common.UnitTests/ExtensionFramework/Utilities/TestLoggerPluginInformationTests.cs +++ b/test/Microsoft.TestPlatform.Common.UnitTests/ExtensionFramework/Utilities/TestLoggerPluginInformationTests.cs @@ -56,8 +56,6 @@ public void MetadataShouldReturnExtensionUriAndFriendlyName() CollectionAssert.AreEqual(new object[] { DefaultExtensionUri, DefaultFriendlyName }, _testPluginInformation.Metadata.ToArray()); } - #region Implementation - private class DummyTestExtensionWithNoFriendlyName { } @@ -68,5 +66,4 @@ private class DummyTestExtensionWithFriendlyName { } - #endregion } diff --git a/test/Microsoft.TestPlatform.Common.UnitTests/ExtensionFramework/Utilities/TestPluginInformationTests.cs b/test/Microsoft.TestPlatform.Common.UnitTests/ExtensionFramework/Utilities/TestPluginInformationTests.cs index 9370c2ad8c..0c7a2292cf 100644 --- a/test/Microsoft.TestPlatform.Common.UnitTests/ExtensionFramework/Utilities/TestPluginInformationTests.cs +++ b/test/Microsoft.TestPlatform.Common.UnitTests/ExtensionFramework/Utilities/TestPluginInformationTests.cs @@ -40,13 +40,9 @@ public void MetadataShouldReturnTestExtensionTypesAssemblyQualifiedName() } } -#region Implementation - public class TestableTestPluginInformation : TestPluginInformation { public TestableTestPluginInformation(Type testExtensionType) : base(testExtensionType) { } } - -#endregion diff --git a/test/Microsoft.TestPlatform.Common.UnitTests/ExtensionFramework/Utilities/TestSettingsProviderPluginInformationTests.cs b/test/Microsoft.TestPlatform.Common.UnitTests/ExtensionFramework/Utilities/TestSettingsProviderPluginInformationTests.cs index e10e5d4fd5..9e03cce0bd 100644 --- a/test/Microsoft.TestPlatform.Common.UnitTests/ExtensionFramework/Utilities/TestSettingsProviderPluginInformationTests.cs +++ b/test/Microsoft.TestPlatform.Common.UnitTests/ExtensionFramework/Utilities/TestSettingsProviderPluginInformationTests.cs @@ -53,8 +53,6 @@ public void SettingsNameShouldReturnExtensionUriOfAnExtension() Assert.AreEqual(DefaultSettingsName, _testPluginInformation.SettingsName); } - #region Implementation - private class DummySettingProviderWithoutSettingsName { } @@ -64,5 +62,4 @@ private class DummySettingProviderWithSettingsName { } - #endregion } diff --git a/test/Microsoft.TestPlatform.Common.UnitTests/Hosting/TestHostProviderManagerTests.cs b/test/Microsoft.TestPlatform.Common.UnitTests/Hosting/TestHostProviderManagerTests.cs index ff02cb8a9d..1fb92d08eb 100644 --- a/test/Microsoft.TestPlatform.Common.UnitTests/Hosting/TestHostProviderManagerTests.cs +++ b/test/Microsoft.TestPlatform.Common.UnitTests/Hosting/TestHostProviderManagerTests.cs @@ -149,8 +149,6 @@ public void TestHostProviderManagerShouldReturnNullIfTargetFrameworkIsPortable() Assert.IsNull(manager.GetTestHostManagerByRunConfiguration(runSettingsXml)); } - #region Implementations - [ExtensionUri("executor://DesktopTestHost")] [FriendlyName("DesktopTestHost")] private class CustomTestHost : ITestRuntimeProvider @@ -297,5 +295,4 @@ public IEnumerable GetTestSources(IEnumerable sources) } } - #endregion } diff --git a/test/Microsoft.TestPlatform.Common.UnitTests/RunSettingsTests.cs b/test/Microsoft.TestPlatform.Common.UnitTests/RunSettingsTests.cs index c751c40bc1..7c5d8e22f5 100644 --- a/test/Microsoft.TestPlatform.Common.UnitTests/RunSettingsTests.cs +++ b/test/Microsoft.TestPlatform.Common.UnitTests/RunSettingsTests.cs @@ -26,8 +26,6 @@ public void TestCleanup() TestSessionMessageLogger.Instance = null; } - #region LoadSettingsXML Tests - [TestMethod] public void LoadSettingsXmlShouldThrowOnNullSettings() { @@ -70,10 +68,6 @@ public void LoadSettingsXmlShouldThrowOnInvalidSettings() "An error occurred while loading the run settings."); } - #endregion - - #region InitializeSettingsProviders and GetSettings tests - [TestMethod] public void InitializeSettingsProvidersShouldThrowOnNullSettings() { @@ -204,10 +198,6 @@ public void InitializeSettingsProvidersShouldWarnOfDuplicateSettings() receivedWarningMessage); } - #endregion - - #region GetSettings tests - [TestMethod] public void GetSettingsShouldThrowIfSettingsNameIsNull() { @@ -225,10 +215,6 @@ public void GetSettingsShouldThrowIfSettingsNameIsEmpty() } // The remaining GetSettings tests are covered in the InitializeSettingsProviders tests above. - #endregion - - #region Private methods - private string GetEmptyRunSettings() { return @" @@ -297,10 +283,6 @@ private string GetInvalidRunSettings() "; } - #endregion - - #region Testable Implementations - [SettingsName("RunConfiguration")] private class RunConfigurationSettingsProvider : ISettingsProvider { @@ -334,5 +316,4 @@ public void Load(XmlReader reader) } } - #endregion } diff --git a/test/Microsoft.TestPlatform.Common.UnitTests/SettingsProvider/SettingsProviderExtensionManagerTests.cs b/test/Microsoft.TestPlatform.Common.UnitTests/SettingsProvider/SettingsProviderExtensionManagerTests.cs index 94c0a47a2d..345374f019 100644 --- a/test/Microsoft.TestPlatform.Common.UnitTests/SettingsProvider/SettingsProviderExtensionManagerTests.cs +++ b/test/Microsoft.TestPlatform.Common.UnitTests/SettingsProvider/SettingsProviderExtensionManagerTests.cs @@ -30,8 +30,6 @@ public void TestCleanup() SettingsProviderExtensionManager.Destroy(); } - #region Constructor tests - [TestMethod] public void ConstructorShouldPopulateSettingsProviderMap() { @@ -74,10 +72,6 @@ public void ConstructorShouldLogWarningOnDuplicateSettingsProviderNames() Assert.AreEqual("TestableSettings", spm.SettingsProvidersMap.Keys.FirstOrDefault()); } - #endregion - - #region Create tests - [TestMethod] public void CreateShouldDiscoverSettingsProviderExtensions() { @@ -101,10 +95,6 @@ public void CreateShouldCacheDiscoveredExtensions() Assert.IsTrue(extensionManager.SettingsProvidersMap.Count > 0); } - #endregion - - #region LoadAndInitialize tests - [TestMethod] public void LoadAndInitializeShouldInitializeAllExtensions() { @@ -120,10 +110,6 @@ public void LoadAndInitializeShouldInitializeAllExtensions() } } - #endregion - - #region GetSettingsProvider tests - [TestMethod] public void GetSettingsProviderShouldThrowIfSettingsNameIsNullOrEmpty() { @@ -178,10 +164,6 @@ public void GetSettingsProviderShouldReturnSettingsProviderInstance() Assert.IsNotNull(sp.Value); } - #endregion - - #region private methods - private IEnumerable> GetMockExtensions(params string[] settingNames) { var settingsList = new List>(); @@ -202,10 +184,6 @@ private IEnumerable(() => _tcpClient.ConnectAsync(IPAddress.Loopback, port).Wait()); } - #endregion - - #region Client tests - [TestMethod] public async Task SetupClientAsyncShouldConnectToServer() { @@ -174,10 +168,6 @@ public async Task StopClientShouldDisconnectClient() Assert.ThrowsException(() => WriteOnSocket(client.Client)); } - #endregion - - #region Message sender tests - [TestMethod] public async Task SendMessageShouldSendMessageWithoutAnyPayload() { @@ -218,10 +208,6 @@ public async Task SendMessageWithRawMessageShouldNotSerializeThePayload() Assert.AreEqual(DummyPayload, ReadFromStream(client.GetStream())); } - #endregion - - #region Message receiver tests - [TestMethod] public async Task ReceiveMessageShouldReceiveDeserializedMessage() { @@ -268,8 +254,6 @@ public async Task ReceiveRawMessageAsyncShouldNotDeserializeThePayload() Assert.AreEqual(DummyPayload, message); } - #endregion - [TestMethod] public void SocketPollShouldNotHangServerClientCommunication() { diff --git a/test/Microsoft.TestPlatform.CommunicationUtilities.UnitTests/Serialization/TestCaseSerializationTests.cs b/test/Microsoft.TestPlatform.CommunicationUtilities.UnitTests/Serialization/TestCaseSerializationTests.cs index d50fd58fa2..62e0cd23ab 100644 --- a/test/Microsoft.TestPlatform.CommunicationUtilities.UnitTests/Serialization/TestCaseSerializationTests.cs +++ b/test/Microsoft.TestPlatform.CommunicationUtilities.UnitTests/Serialization/TestCaseSerializationTests.cs @@ -30,8 +30,6 @@ public class TestCaseSerializationTests Traits = { new Trait("Priority", "0"), new Trait("Category", "unit") } }; - #region v1 Tests - [TestMethod] public void TestCaseJsonShouldContainAllPropertiesOnSerialization() { @@ -139,10 +137,6 @@ public void TestCasePropertiesShouldGetRegisteredAsPartOfDeserialization() VerifyDummyPropertyIsRegistered(); } - #endregion - - #region v2 Tests - [TestMethod] public void TestCaseJsonShouldContainAllPropertiesOnSerializationV2() { @@ -232,10 +226,6 @@ public void TestCasePropertiesShouldGetRegisteredAsPartOfDeserializationV2() VerifyDummyPropertyIsRegistered(); } - #endregion - - #region Common Tests - [TestMethod] [DataRow(1)] [DataRow(2)] @@ -253,8 +243,6 @@ public void TestCaseObjectShouldDeserializeTraitsWithSpecialCharacters(int versi Assert.AreEqual(@"SDJDDHW>,:&^%//\\\\", traits[0].Value); } - #endregion - private static string Serialize(T data, int version = 1) { return JsonDataSerializer.Instance.Serialize(data, version); diff --git a/test/Microsoft.TestPlatform.CommunicationUtilities.UnitTests/Serialization/TestResultSerializationTests.cs b/test/Microsoft.TestPlatform.CommunicationUtilities.UnitTests/Serialization/TestResultSerializationTests.cs index a1e905c79f..0a55966376 100644 --- a/test/Microsoft.TestPlatform.CommunicationUtilities.UnitTests/Serialization/TestResultSerializationTests.cs +++ b/test/Microsoft.TestPlatform.CommunicationUtilities.UnitTests/Serialization/TestResultSerializationTests.cs @@ -38,8 +38,6 @@ public class TestResultSerializationTests EndTime = DateTimeOffset.MaxValue }; - #region v1 serializer Tests (used with protocol 1 and accidentally with 3) - [TestMethod] [DataRow(1)] [DataRow(3)] @@ -182,10 +180,6 @@ public void TestResultPropertiesShouldGetRegisteredAsPartOfDeserialization(int v VerifyDummyPropertyIsRegistered(); } - #endregion - - #region v2 serializer Tests (used with protocol 2 and 4) - [TestMethod] [DataRow(2)] [DataRow(4)] @@ -274,10 +268,6 @@ public void TestResultPropertiesShouldGetRegisteredAsPartOfDeserializationV2(int VerifyDummyPropertyIsRegistered(); } - #endregion - - #region future - [TestMethod] public void TestResultSerializationShouldThrowWhenProvidedProtocolVersionDoesNotExist() { @@ -289,8 +279,6 @@ public void TestResultSerializationShouldThrowWhenProvidedProtocolVersionDoesNot Assert.ThrowsException(() => Serialize(TestResult, version)); } - #endregion - private static string Serialize(T data, int version) { return JsonDataSerializer.Instance.Serialize(data, version); diff --git a/test/Microsoft.TestPlatform.CommunicationUtilities.UnitTests/TestRequestSenderTests.cs b/test/Microsoft.TestPlatform.CommunicationUtilities.UnitTests/TestRequestSenderTests.cs index 61606ea8bd..b3286e6786 100644 --- a/test/Microsoft.TestPlatform.CommunicationUtilities.UnitTests/TestRequestSenderTests.cs +++ b/test/Microsoft.TestPlatform.CommunicationUtilities.UnitTests/TestRequestSenderTests.cs @@ -239,8 +239,6 @@ public void OnClientProcessExitShouldNotSendRawMessageIfOperationNotStarted() _mockExecutionEventsHandler.Verify(eh => eh.HandleRawMessage(It.IsAny()), Times.Never); } - #region Version Check Tests - [TestMethod] public void CheckVersionWithTestHostShouldSendHighestSupportedVersion() { @@ -286,9 +284,6 @@ public void CheckVersionWithTestHostShouldThrowIfProtocolNegotiationTimeouts() Assert.AreEqual(message, TimoutErrorMessage); } - #endregion - - #region Discovery Protocol Tests [TestMethod] public void InitializeDiscoveryShouldSendCommunicationMessageWithCorrectParameters() { @@ -481,10 +476,6 @@ public void DiscoverTestShouldNotifyDiscoveryCompleteIfClientDisconnected() _mockDiscoveryEventsHandler.Verify(eh => eh.HandleDiscoveryComplete(It.Is(dc => dc.IsAborted == true && dc.TotalCount == -1), null)); } - #endregion - - #region Execution Protocol Tests - [TestMethod] public void InitializeExecutionShouldSendCommunicationMessageWithCorrectParameters() { @@ -781,8 +772,6 @@ public void SendTestRunAbortShouldSendAbortTestRunMessage() _mockChannel.Verify(c => c.Send(It.IsAny()), Times.Once); } - #endregion - private string SetupFakeCommunicationChannel(string connectionArgs = "123") { _connectionInfo = new TestHostConnectionInfo diff --git a/test/Microsoft.TestPlatform.CoreUtilities.UnitTests/Utilities/JobQueueTests.cs b/test/Microsoft.TestPlatform.CoreUtilities.UnitTests/Utilities/JobQueueTests.cs index d78fcb878f..b4777efdf5 100644 --- a/test/Microsoft.TestPlatform.CoreUtilities.UnitTests/Utilities/JobQueueTests.cs +++ b/test/Microsoft.TestPlatform.CoreUtilities.UnitTests/Utilities/JobQueueTests.cs @@ -398,8 +398,6 @@ public void TestDisposeUnblocksBlockedThreads() queueThread.Join(); } - #region Implementation - /// /// a class that inherits from job queue and over rides the WaitForQueueToEmpty to allow for checking that blocking and /// unblocking work as expected. @@ -457,10 +455,6 @@ protected override bool WaitForQueueToGetEmpty() } } - #endregion - - #region Utility Methods - /// /// Returns a job processing handler which does nothing. /// @@ -475,5 +469,4 @@ private static Action GetEmptyProcessHandler() return handler; } - #endregion } diff --git a/test/Microsoft.TestPlatform.CrossPlatEngine.UnitTests/Adapter/TestExecutionRecorderTests.cs b/test/Microsoft.TestPlatform.CrossPlatEngine.UnitTests/Adapter/TestExecutionRecorderTests.cs index 1d7f73cb93..9ef3667563 100644 --- a/test/Microsoft.TestPlatform.CrossPlatEngine.UnitTests/Adapter/TestExecutionRecorderTests.cs +++ b/test/Microsoft.TestPlatform.CrossPlatEngine.UnitTests/Adapter/TestExecutionRecorderTests.cs @@ -110,7 +110,6 @@ public void RecordAttachmentsShouldAddToAttachmentSetForMultipleAttachments() CollectionAssert.AreEqual(attachmentSet, attachments); } - #region TestCaseResult caching tests. [TestMethod] public void RecordStartShouldInvokeSendTestCaseStart() { @@ -222,5 +221,4 @@ public void RecordResultShouldSendTestCaseEndEventIfRecordEndWasNotCalled() Assert.IsTrue(_testableTestRunCache.TestResultList.Contains(_testResult)); } - #endregion } diff --git a/test/Microsoft.TestPlatform.CrossPlatEngine.UnitTests/DataCollection/DataCollectionTestRunEventsHandlerTests.cs b/test/Microsoft.TestPlatform.CrossPlatEngine.UnitTests/DataCollection/DataCollectionTestRunEventsHandlerTests.cs index beb32d7cf7..3d22130ff7 100644 --- a/test/Microsoft.TestPlatform.CrossPlatEngine.UnitTests/DataCollection/DataCollectionTestRunEventsHandlerTests.cs +++ b/test/Microsoft.TestPlatform.CrossPlatEngine.UnitTests/DataCollection/DataCollectionTestRunEventsHandlerTests.cs @@ -140,7 +140,6 @@ public void HandleRawMessageShouldInvokeAfterTestRunEndAndReturnInvokedDataColle Times.Once); } - #region Get Combined Attachments [TestMethod] public void GetCombinedAttachmentSetsShouldReturnCombinedAttachments() { @@ -182,5 +181,4 @@ public void GetCombinedAttachmentSetsShouldReturnNullIfFirstArgumentIsNull() Assert.IsNull(result); } - #endregion } diff --git a/test/Microsoft.TestPlatform.CrossPlatEngine.UnitTests/Discovery/DiscovererEnumeratorTests.cs b/test/Microsoft.TestPlatform.CrossPlatEngine.UnitTests/Discovery/DiscovererEnumeratorTests.cs index 565cfd0c3b..29aea3e1b7 100644 --- a/test/Microsoft.TestPlatform.CrossPlatEngine.UnitTests/Discovery/DiscovererEnumeratorTests.cs +++ b/test/Microsoft.TestPlatform.CrossPlatEngine.UnitTests/Discovery/DiscovererEnumeratorTests.cs @@ -618,8 +618,6 @@ private void InvokeLoadTestWithMockSetup() _discovererEnumerator.LoadTests(extensionSourceMap, _runSettingsMock.Object, null, _messageLoggerMock.Object); } - #region Implementation - /// /// Placing this before others so that at runtime this would be the first to be discovered as a discoverer. /// @@ -776,5 +774,4 @@ public static void Reset() } } - #endregion } diff --git a/test/Microsoft.TestPlatform.CrossPlatEngine.UnitTests/Discovery/DiscoveryManagerTests.cs b/test/Microsoft.TestPlatform.CrossPlatEngine.UnitTests/Discovery/DiscoveryManagerTests.cs index 741e7157bf..241c751d09 100644 --- a/test/Microsoft.TestPlatform.CrossPlatEngine.UnitTests/Discovery/DiscoveryManagerTests.cs +++ b/test/Microsoft.TestPlatform.CrossPlatEngine.UnitTests/Discovery/DiscoveryManagerTests.cs @@ -51,8 +51,6 @@ public void TestCleanup() TestPluginCache.Instance = null; } - #region Initialize tests - [TestMethod] public void InitializeShouldUpdateAdditionalExtenions() { @@ -70,10 +68,6 @@ public void InitializeShouldUpdateAdditionalExtenions() Assert.IsTrue(allDiscoverers.Any()); } - #endregion - - #region DiscoverTests tests - [TestMethod] public void DiscoverTestsShouldLogIfTheSourceDoesNotExist() { @@ -268,5 +262,4 @@ public void DiscoveryInitializeShouldVerifyWarningMessageIfAdapterFailedToLoad() mockLogger.Verify(rd => rd.HandleLogMessage(TestMessageLevel.Warning, "verify that the HandleLogMessage method getting invoked at least once"), Times.Once); } - #endregion } diff --git a/test/Microsoft.TestPlatform.CrossPlatEngine.UnitTests/EventHandlers/TestRequestHandlerTests.cs b/test/Microsoft.TestPlatform.CrossPlatEngine.UnitTests/EventHandlers/TestRequestHandlerTests.cs index 4cdd5ae863..4a7bcd58aa 100644 --- a/test/Microsoft.TestPlatform.CrossPlatEngine.UnitTests/EventHandlers/TestRequestHandlerTests.cs +++ b/test/Microsoft.TestPlatform.CrossPlatEngine.UnitTests/EventHandlers/TestRequestHandlerTests.cs @@ -135,8 +135,6 @@ public void ProcessRequestsShouldProcessMessagesUntilSessionCompleted() Assert.IsTrue(task.Wait(2000)); } - #region Version Check Protocol - [TestMethod] public void ProcessRequestsVersionCheckShouldAckMinimumOfGivenAndHighestSupportedVersion() { @@ -167,10 +165,6 @@ public void ProcessRequestsVersionCheckShouldLogErrorIfDiagnosticsEnableFails() SendSessionEnd(); } - #endregion - - #region Discovery Protocol - [TestMethod] public void ProcessRequestsDiscoveryInitializeShouldSetExtensionPaths() { @@ -211,10 +205,6 @@ public void DiscoveryCompleteShouldSendDiscoveryCompletePayloadOnChannel() SendSessionEnd(); } - #endregion - - #region Execution Protocol - [TestMethod] public void ProcessRequestsExecutionInitializeShouldSetExtensionPaths() { @@ -388,9 +378,6 @@ public void LaunchProcessWithDebuggerAttachedShouldWaitForProcessIdFromRunner() Assert.AreEqual(123, task.Result); } - #endregion - - #region Logging Protocol [TestMethod] public void SendLogShouldSendTestMessageWithLevelOnChannel() { @@ -410,8 +397,6 @@ public void SendLogShouldSendTestMessageWithLevelOnChannel() SendSessionEnd(); } - #endregion - [TestMethod] public void ProcessRequestsEndSessionShouldCloseRequestHandler() { diff --git a/test/Microsoft.TestPlatform.CrossPlatEngine.UnitTests/Execution/BaseRunTestsTests.cs b/test/Microsoft.TestPlatform.CrossPlatEngine.UnitTests/Execution/BaseRunTestsTests.cs index 7bd5b3adb7..9dd664b72f 100644 --- a/test/Microsoft.TestPlatform.CrossPlatEngine.UnitTests/Execution/BaseRunTestsTests.cs +++ b/test/Microsoft.TestPlatform.CrossPlatEngine.UnitTests/Execution/BaseRunTestsTests.cs @@ -106,8 +106,6 @@ public void Cleanup() TestPluginCacheHelper.ResetExtensionsCache(); } - #region Constructor tests - [TestMethod] public void ConstructorShouldInitializeRunContext() { @@ -133,10 +131,6 @@ public void ConstructorShouldInitializeExecutorUrisThatRanTests() Assert.IsNotNull(executorUris); } - #endregion - - #region RunTests tests - [TestMethod] public void RunTestsShouldRaiseTestRunCompleteWithAbortedAsTrueOnException() { @@ -775,10 +769,6 @@ public void CancelShouldCreateStaThreadIfExecutionThreadApartmentStateIsSta() "Both RunTests() and Cancel() should create STA thread."); } - #endregion - - #region Private Methods - private void SetupExecutorUriMock() { var executorUriExtensionMap = new List> @@ -913,10 +903,6 @@ private void SetupHandleTestRunComplete() }); } - #endregion - - #region Testable Implementation - private class TestableBaseRunTests : BaseRunTests { public TestableBaseRunTests( @@ -1054,6 +1040,4 @@ public void RunTests(IEnumerable tests, IRunContext runContext, IFrame } } - #endregion - } diff --git a/test/Microsoft.TestPlatform.CrossPlatEngine.UnitTests/Execution/ExecutionManagerTests.cs b/test/Microsoft.TestPlatform.CrossPlatEngine.UnitTests/Execution/ExecutionManagerTests.cs index ed107d2e2e..37a2bad533 100644 --- a/test/Microsoft.TestPlatform.CrossPlatEngine.UnitTests/Execution/ExecutionManagerTests.cs +++ b/test/Microsoft.TestPlatform.CrossPlatEngine.UnitTests/Execution/ExecutionManagerTests.cs @@ -250,10 +250,6 @@ public void InitializeShouldVerifyTheHandlerInitializationWhenAdapterIsFailedToL mockLogger.Verify(rd => rd.HandleLogMessage(It.IsAny(), "verify that the HandleLogMessage method will not be invoked when handler is not initialized"), Times.Never); } - #region Implementations - - #region Discoverers - private abstract class AbstractTestDiscoverer : ITestDiscoverer { public void DiscoverTests(IEnumerable sources, IDiscoveryContext discoveryContext, IMessageLogger logger, ITestCaseDiscoverySink discoverySink) @@ -278,10 +274,6 @@ public void DiscoverTests(IEnumerable sources, IDiscoveryContext discove } } - #endregion - - #region Executors - [ExtensionUri("ValidExecutor")] private class ValidExecutor : ITestExecutor { @@ -339,10 +331,6 @@ public void RunTests(IEnumerable tests, IRunContext runContext, IFrame } } - #endregion - - #region Loggers - [ExtensionUri("csv")] private class ValidLogger : ITestLogger { @@ -370,10 +358,6 @@ public void Initialize(TestLoggerEvents events, string testRunDirectory) } } - #endregion - - #region Settings Providers - [SettingsName("ValidSettingsProvider")] private class ValidSettingsProvider : ISettingsProvider { @@ -401,10 +385,6 @@ public void Load(XmlReader reader) } } - #endregion - - #region DataCollectors - public class InvalidDataCollector : DataCollector { public override void Initialize( @@ -441,8 +421,6 @@ public override void Initialize( } } - #endregion - internal class FaultyTestExecutorPluginInformation : TestExtensionPluginInformation { /// @@ -454,5 +432,4 @@ public FaultyTestExecutorPluginInformation(Type type) : base(type) throw new Exception(); } } - #endregion } diff --git a/test/Microsoft.TestPlatform.CrossPlatEngine.UnitTests/Execution/RunTestsWithSourcesTests.cs b/test/Microsoft.TestPlatform.CrossPlatEngine.UnitTests/Execution/RunTestsWithSourcesTests.cs index 956dbc1cf1..54fe53b2e0 100644 --- a/test/Microsoft.TestPlatform.CrossPlatEngine.UnitTests/Execution/RunTestsWithSourcesTests.cs +++ b/test/Microsoft.TestPlatform.CrossPlatEngine.UnitTests/Execution/RunTestsWithSourcesTests.cs @@ -338,8 +338,6 @@ private void SetupForNoTestsAvailable(string testCaseFilter, out string sourcesS _mockRequestData.Object); } - #region Testable Implementations - private class TestableRunTestsWithSources : RunTestsWithSources { public TestableRunTestsWithSources(Dictionary> adapterSourceMap, string runSettings, @@ -415,5 +413,4 @@ public void RunTests(IEnumerable tests, IRunContext runContext, IFrame } } - #endregion } diff --git a/test/Microsoft.TestPlatform.CrossPlatEngine.UnitTests/Execution/RunTestsWithTestsTests.cs b/test/Microsoft.TestPlatform.CrossPlatEngine.UnitTests/Execution/RunTestsWithTestsTests.cs index feac386fd9..62a2fa6356 100644 --- a/test/Microsoft.TestPlatform.CrossPlatEngine.UnitTests/Execution/RunTestsWithTestsTests.cs +++ b/test/Microsoft.TestPlatform.CrossPlatEngine.UnitTests/Execution/RunTestsWithTestsTests.cs @@ -195,8 +195,6 @@ public void SendSessionEndShouldCallSessionEnd() mockTestCaseEventsHandler.Verify(x => x.SendSessionEnd()); } - #region Testable Implementations - private class TestableRunTestsWithTests : RunTestsWithTests { public TestableRunTestsWithTests(IEnumerable testCases, @@ -238,6 +236,4 @@ public void CallSendSessionEnd() } } - #endregion - } diff --git a/test/Microsoft.TestPlatform.CrossPlatEngine.UnitTests/Execution/TestRunCacheTests.cs b/test/Microsoft.TestPlatform.CrossPlatEngine.UnitTests/Execution/TestRunCacheTests.cs index 62b4979dbd..3762b555de 100644 --- a/test/Microsoft.TestPlatform.CrossPlatEngine.UnitTests/Execution/TestRunCacheTests.cs +++ b/test/Microsoft.TestPlatform.CrossPlatEngine.UnitTests/Execution/TestRunCacheTests.cs @@ -16,8 +16,6 @@ namespace TestPlatform.CrossPlatEngine.UnitTests.Execution; [TestClass] public class TestRunCacheBehaviors { - #region OnTestStarted tests - [TestMethod] public void OnTestStartedShouldAddToInProgressTests() { @@ -83,10 +81,6 @@ public void OnTestStartedShouldReportResultsOnCacheHit() Assert.AreEqual(2, tester.TotalInProgressTestsReceived); } - #endregion - - #region OnNewTestResult tests - [TestMethod] public void OnNewTestResultShouldAddToTotalExecutedTests() { @@ -210,10 +204,6 @@ public void OnNewTestResultShouldReportResultsMultipleTimes() Assert.AreEqual(5, cache.TestResults.Count); } - #endregion - - #region OnTestCompletion tests - [TestMethod] public void OnTestCompletionShouldNotThrowIfCompletedTestIsNull() { @@ -294,10 +284,6 @@ public void OnTestCompleteShouldNotRemoveTestCaseFromInProgressListForUnrelatedT Assert.AreEqual(1, cache.InProgressTests.Count); } - #endregion - - #region GetLastChunk tests - [TestMethod] public void GetLastChunkShouldReturnTestResultsInCache() { @@ -336,10 +322,6 @@ public void GetLastChunkShouldResetTestResultsInCache() Assert.AreEqual(0, cache.TestResults.Count); } - #endregion - - #region TestRunStasts tests - [TestMethod] public void TestRunStatsShouldReturnCurrentStats() { @@ -363,10 +345,6 @@ public void TestRunStatsShouldReturnCurrentStats() Assert.AreEqual(5, stats.Stats[TestOutcome.Failed]); } - #endregion - - #region Helpers - private Microsoft.VisualStudio.TestPlatform.ObjectModel.TestResult GetTestResult(int index) { var tc = new TestCase("Test" + index, new Uri("executor://dummy"), "DummySourceFileName"); @@ -398,5 +376,4 @@ public void CacheHitOnTimerLimit(ICollection(() => _htmlLogger.TestMessageHandler(new object(), default)); } - #endregion - [TestMethod] public void TestMessageHandlerShouldAddMessageWhenItIsInformation() { diff --git a/test/Microsoft.TestPlatform.ObjectModel.UnitTests/Client/TestRunCriteriaTests.cs b/test/Microsoft.TestPlatform.ObjectModel.UnitTests/Client/TestRunCriteriaTests.cs index 78cead76da..a2d7395f52 100644 --- a/test/Microsoft.TestPlatform.ObjectModel.UnitTests/Client/TestRunCriteriaTests.cs +++ b/test/Microsoft.TestPlatform.ObjectModel.UnitTests/Client/TestRunCriteriaTests.cs @@ -17,8 +17,6 @@ namespace Microsoft.TestPlatform.ObjectModel.UnitTests; [TestClass] public class TestRunCriteriaTests { - #region Constructor tests. - [TestMethod] public void ConstructorForSourcesShouldInitializeAdapterSourceMap() { @@ -58,10 +56,6 @@ public void ConstructorForSourcesWithAdapterSourceMapShouldInitializeSourceMap() CollectionAssert.AreEqual(sourceSet2, testRunCriteria.AdapterSourceMap.Values.ToArray()[1].ToList()); } - #endregion - - #region Sources tests. - [TestMethod] public void SourcesShouldEnumerateThroughAllSourcesInTheAdapterSourceMap() { @@ -89,10 +83,6 @@ public void SourcesShouldReturnNullIfAdapterSourceMapIsNull() Assert.IsNull(testRunCriteria.Sources); } - #endregion - - #region HasSpecificSources tests - [TestMethod] public void HasSpecificSourcesReturnsFalseIfSourcesAreNotSpecified() { @@ -113,10 +103,6 @@ public void HasSpecificSourcesReturnsTrueIfSourcesAreSpecified() Assert.IsTrue(testRunCriteria.HasSpecificSources); } - #endregion - - #region HasSpecificTests tests - [TestMethod] public void HasSpecificTestsReturnsTrueIfTestsAreSpecified() { @@ -137,10 +123,6 @@ public void HasSpecificTestsReturnsFalseIfSourcesAreSpecified() Assert.IsFalse(testRunCriteria.HasSpecificTests); } - #endregion - - #region TestCaseFilter tests - [TestMethod] public void TestCaseFilterSetterShouldSetFilterCriteriaForSources() { @@ -150,5 +132,4 @@ public void TestCaseFilterSetterShouldSetFilterCriteriaForSources() Assert.AreEqual("foo", testRunCriteria.TestCaseFilter); } - #endregion } diff --git a/test/Microsoft.TestPlatform.ObjectModel.UnitTests/TestCaseTests.cs b/test/Microsoft.TestPlatform.ObjectModel.UnitTests/TestCaseTests.cs index 1307d64e28..5a84e597fc 100644 --- a/test/Microsoft.TestPlatform.ObjectModel.UnitTests/TestCaseTests.cs +++ b/test/Microsoft.TestPlatform.ObjectModel.UnitTests/TestCaseTests.cs @@ -64,8 +64,6 @@ public void TestCaseLocalExtensionDataIsPubliclySettableGettableProperty() Assert.AreEqual("foo", _testCase.LocalExtensionData); } - #region GetSetPropertyValue Tests - [TestMethod] public void TestCaseGetPropertyValueForCodeFilePathShouldReturnCorrectValue() { @@ -192,5 +190,4 @@ public void TestCaseSetPropertyValueForSourceShouldSetValue() Assert.AreEqual(testSource, _testCase.Source); } - #endregion } diff --git a/test/Microsoft.TestPlatform.ObjectModel.UnitTests/TestResultTests.cs b/test/Microsoft.TestPlatform.ObjectModel.UnitTests/TestResultTests.cs index 14f5c0bf08..d4bf67f013 100644 --- a/test/Microsoft.TestPlatform.ObjectModel.UnitTests/TestResultTests.cs +++ b/test/Microsoft.TestPlatform.ObjectModel.UnitTests/TestResultTests.cs @@ -42,8 +42,6 @@ public void TestResultShouldInitializeStartAndEndTimeToCurrent() Assert.IsTrue(_result.EndTime.Subtract(DateTimeOffset.UtcNow) < new TimeSpan(0, 0, 0, 10)); } - #region GetSetPropertyValue Tests - [TestMethod] public void TestResultGetPropertyValueForComputerNameShouldReturnCorrectValue() { @@ -188,6 +186,4 @@ public void TestResultSetPropertyValueForStartTimeShouldSetValue() Assert.AreEqual(testStartTime, _result.StartTime); } - #endregion - } diff --git a/test/Microsoft.TestPlatform.ObjectModel.UnitTests/Utilities/XmlRunSettingsUtilitiesTests.cs b/test/Microsoft.TestPlatform.ObjectModel.UnitTests/Utilities/XmlRunSettingsUtilitiesTests.cs index 67ca5d562d..9b37dea928 100644 --- a/test/Microsoft.TestPlatform.ObjectModel.UnitTests/Utilities/XmlRunSettingsUtilitiesTests.cs +++ b/test/Microsoft.TestPlatform.ObjectModel.UnitTests/Utilities/XmlRunSettingsUtilitiesTests.cs @@ -18,8 +18,6 @@ namespace Microsoft.TestPlatform.ObjectModel.UnitTests.Utilities; [TestClass] public class XmlRunSettingsUtilitiesTests { - #region Private Variables - private readonly string _runSettingsXmlWithDataCollectors = @" @@ -82,10 +80,6 @@ public class XmlRunSettingsUtilitiesTests private readonly string _emptyRunSettings = ""; - #endregion - - #region GetTestRunParameters tests - [TestMethod] public void GetTestRunParametersReturnsEmptyDictionaryOnNullRunSettings() { @@ -285,10 +279,6 @@ public void GetInProcDataCollectionRunSettingsThrowsExceptionWhenXmlNotValid() Assert.ThrowsException( () => XmlRunSettingsUtilities.GetInProcDataCollectionRunSettings(settingsXml)); } - #endregion - - #region CreateDefaultRunSettings tests - [TestMethod] public void CreateDefaultRunSettingsShouldReturnABasicRunSettings() { @@ -304,10 +294,6 @@ public void CreateDefaultRunSettingsShouldReturnABasicRunSettings() Assert.AreEqual(expectedRunSettings, defaultRunSettings); } - #endregion - - #region IsDataCollectionEnabled tests - [TestMethod] public void IsDataCollectionEnabledShouldReturnFalseIfRunSettingsIsNull() { @@ -333,10 +319,6 @@ public void IsDataCollectionEnabledShouldReturnTrueIfDataCollectionIsEnabled() Assert.IsTrue(XmlRunSettingsUtilities.IsDataCollectionEnabled(_runSettingsXmlWithDataCollectors)); } - #endregion - - #region IsInProcDataCollectionEnabled tests. - [TestMethod] public void IsInProcDataCollectionEnabledShouldReturnFalseIfRunSettingsIsNull() { @@ -361,10 +343,6 @@ public void IsInProcDataCollectionEnabledShouldReturnTrueIfDataCollectionIsEnabl Assert.IsTrue(XmlRunSettingsUtilities.IsInProcDataCollectionEnabled(ConvertOutOfProcDataCollectionSettingsToInProcDataCollectionSettings(_runSettingsXmlWithDataCollectors))); } - #endregion - - #region GetLoggerRunsettings tests - [TestMethod] public void GetLoggerRunSettingsShouldReturnNullWhenSettingsIsnull() { @@ -1139,10 +1117,6 @@ public void GetLoggerRunSettingsShouldReturnLastConfigurationElementIfMultiplePr loggerRunSettings.LoggerSettingsList.First().Configuration.InnerXml); } - #endregion - - #region GetDataCollectionRunSettings tests - [TestMethod] public void GetDataCollectionRunSettingsShouldReturnNullIfSettingsIsNull() { @@ -1173,8 +1147,6 @@ public void GetDataCollectionRunSettingsShouldThrowOnMalformedDataCollectorSetti Assert.ThrowsException(() => XmlRunSettingsUtilities.GetDataCollectionRunSettings(_runSettingsXmlWithIncorrectDataCollectorSettings)); } - #endregion - [TestMethod] public void GetDataCollectorsFriendlyNameShouldReturnListOfFriendlyName() { diff --git a/test/Microsoft.TestPlatform.TestUtilities/PerfInstrumentation/Constants.cs b/test/Microsoft.TestPlatform.TestUtilities/PerfInstrumentation/Constants.cs index d35a18741b..3db5129c1e 100644 --- a/test/Microsoft.TestPlatform.TestUtilities/PerfInstrumentation/Constants.cs +++ b/test/Microsoft.TestPlatform.TestUtilities/PerfInstrumentation/Constants.cs @@ -55,8 +55,6 @@ public class Constants /// public const string AdapterDiscoveryTask = "AdapterDiscovery"; - #region PayLoad Property Names - /// /// The execution uri property. /// @@ -66,6 +64,4 @@ public class Constants /// The number of tests property. /// public const string NumberOfTestsProperty = "numberOfTests"; - #endregion - } diff --git a/test/Microsoft.TestPlatform.Utilities.UnitTests/CodeCoverageRunSettingsProcessorTests.cs b/test/Microsoft.TestPlatform.Utilities.UnitTests/CodeCoverageRunSettingsProcessorTests.cs index 4f15c659d2..9e802dc14e 100644 --- a/test/Microsoft.TestPlatform.Utilities.UnitTests/CodeCoverageRunSettingsProcessorTests.cs +++ b/test/Microsoft.TestPlatform.Utilities.UnitTests/CodeCoverageRunSettingsProcessorTests.cs @@ -18,21 +18,14 @@ namespace Microsoft.TestPlatform.Utilities.UnitTests; [TestClass] public class CodeCoverageRunSettingsProcessorTests { - #region Members private readonly XmlElement _defaultSettings; private readonly CodeCoverageRunSettingsProcessor _processor; - #endregion - - #region Constructors public CodeCoverageRunSettingsProcessorTests() { _defaultSettings = GetDefaultConfiguration(); _processor = new CodeCoverageRunSettingsProcessor(_defaultSettings); } - #endregion - - #region Test Methods [TestMethod] public void ProcessingShouldReturnNullForNullOrEmptySettings() { @@ -216,9 +209,6 @@ public void MixedTestShouldCorrectlyAddMissingTags() CompareResults(codeCoverageNodes.Item1, codeCoverageNodes.Item2, "./Attributes/Exclude"); CompareResults(codeCoverageNodes.Item1, codeCoverageNodes.Item2, "./Sources/Exclude"); } - #endregion - - #region Helpers private XmlNode ExtractNode(XmlNode node, string path) { try @@ -283,5 +273,4 @@ private void CompareResults(XmlNode currentSettingsRoot, XmlNode defaultSettings Assert.AreEqual(0, set.Count); } - #endregion } diff --git a/test/Microsoft.TestPlatform.Utilities.UnitTests/InferRunSettingsHelperTests.cs b/test/Microsoft.TestPlatform.Utilities.UnitTests/InferRunSettingsHelperTests.cs index ced891866b..22b97e8d7c 100644 --- a/test/Microsoft.TestPlatform.Utilities.UnitTests/InferRunSettingsHelperTests.cs +++ b/test/Microsoft.TestPlatform.Utilities.UnitTests/InferRunSettingsHelperTests.cs @@ -392,7 +392,6 @@ public void UpdateTargetFrameworkShouldAddFrameworkXmlNodeIfNotPresent() [TestMethod] public void FilterCompatibleSourcesShouldIdentifyIncomaptiableSourcesAndConstructWarningMessage() { - #region Arrange _sourceArchitectures["AnyCPU1net46.dll"] = Architecture.AnyCPU; _sourceArchitectures["x64net47.exe"] = Architecture.X64; _sourceArchitectures["x86net45.dll"] = Architecture.X86; @@ -410,7 +409,6 @@ public void FilterCompatibleSourcesShouldIdentifyIncomaptiableSourcesAndConstruc var expected = string.Format(CultureInfo.CurrentCulture, OMResources.DisplayChosenSettings, _frameworkNet45, Constants.DefaultPlatform, sb.ToString(), MultiTargettingForwardLink); - #endregion var compatibleSources = InferRunSettingsHelper.FilterCompatibleSources(Constants.DefaultPlatform, Constants.DefaultPlatform, _frameworkNet45, _sourceArchitectures, _sourceFrameworks, out string warningMessage); // None of the DLLs passed are compatible to the chosen settings @@ -629,8 +627,6 @@ public void GetEnvironmentVariablesWithoutEnvVarNodeInRunSettingsShouldReturnNul Assert.IsNull(envVars); } - #region RunSettingsIncompatibeWithTestSettings Tests - [TestMethod] public void RunSettingsWithCodeCoverageAndInlineTestSettingsXml() { @@ -801,10 +797,6 @@ public void RunSettingsWithDisabledCollectionSettingsAndInlineTestSettingsXml() ConvertOutOfProcToInProcDataCollectionSettings(runSettingsWithDisabledCollectionSettingsAndInlineTestSettingsXml)), "Invalid response"); } - #endregion - - #region Private Methods - private string GetSourceIncompatibleMessage(string source) { return string.Format(CultureInfo.CurrentCulture, OMResources.SourceIncompatible, source, _sourceFrameworks[source].Name, _sourceArchitectures[source]); @@ -832,5 +824,4 @@ private string ConvertOutOfProcToInProcDataCollectionSettings(string settings) .Replace("", ""); } - #endregion } diff --git a/test/Microsoft.TestPlatform.Utilities.UnitTests/MSTestSettingsUtilitiesTests.cs b/test/Microsoft.TestPlatform.Utilities.UnitTests/MSTestSettingsUtilitiesTests.cs index ea27d62e2b..1e90879084 100644 --- a/test/Microsoft.TestPlatform.Utilities.UnitTests/MSTestSettingsUtilitiesTests.cs +++ b/test/Microsoft.TestPlatform.Utilities.UnitTests/MSTestSettingsUtilitiesTests.cs @@ -15,8 +15,6 @@ namespace Microsoft.TestPlatform.Utilities.Tests; [TestClass] public class MsTestSettingsUtilitiesTests { - #region IsLegacyTestSettingsFile tests - [TestMethod] public void IsLegacyTestSettingsFileShouldReturnTrueIfTestSettingsExtension() { @@ -35,10 +33,6 @@ public void IsLegacyTestSettingsFileShouldReturnTrueIfVsmdiExtension() Assert.IsTrue(MSTestSettingsUtilities.IsLegacyTestSettingsFile("C:\\temp\\t.vsmdi")); } - #endregion - - #region Import tests - [TestMethod] public void ImportShouldThrowIfNotLegacySettingsFile() { @@ -119,5 +113,4 @@ public void ImportShouldEmbedTestSettingsAndDefaultRunConfigurationInformation() Assert.AreEqual(expectedSettingsXml, finalSettingsXml); } - #endregion } diff --git a/test/Microsoft.TestPlatform.Utilities.UnitTests/XmlUtilitiesTests.cs b/test/Microsoft.TestPlatform.Utilities.UnitTests/XmlUtilitiesTests.cs index 59bc9ae7f3..01af1d864c 100644 --- a/test/Microsoft.TestPlatform.Utilities.UnitTests/XmlUtilitiesTests.cs +++ b/test/Microsoft.TestPlatform.Utilities.UnitTests/XmlUtilitiesTests.cs @@ -17,8 +17,6 @@ namespace Microsoft.TestPlatform.Utilities.UnitTests; [TestClass] public class XmlUtilitiesTests { - #region GetNodeXml tests - [TestMethod] public void GetNodeXmlShouldThrowIfxmlDocumentIsNull() { @@ -61,10 +59,6 @@ public void GetNodeXmlShouldReturnNodeValue() Assert.AreEqual("abc", XmlUtilities.GetNodeXml(xmlDocument.CreateNavigator(), @"/RunSettings/RC")); } - #endregion - - #region IsValidNodeXmlValue tests - [TestMethod] public void IsValidNodeXmlValueShouldReturnFalseOnArgumentException() { @@ -93,10 +87,6 @@ public void IsValidNodeXmlValueShouldReturnTrueIfValidatorReturnsTrue() Assert.IsTrue(XmlUtilities.IsValidNodeXmlValue("foo", validator)); } - #endregion - - #region AppendOrModifyChild tests - [TestMethod] public void AppendOrModifyChildShouldModifyExistingNode() { @@ -174,10 +164,6 @@ public void AppendOrModifyChildShouldAppendANewNodeWithEscapingSpecialChars() Assert.AreEqual("a&bd\"e'f", rcxmlDocument.InnerText); } - #endregion - - #region RemoveChildNode tests - [TestMethod] public void RemoveChildNodeShouldNotModifyExistingXmlIfNodeDoesnotExist() { @@ -201,10 +187,6 @@ public void RemoveChildNodeShouldRemoveXmlIfExist() Assert.AreEqual(@"", xmlDocument.OuterXml); } - #endregion - - #region Private Methods - private XmlDocument GetXmlDocument(string settingsXml) { var doc = new XmlDocument(); @@ -213,5 +195,4 @@ private XmlDocument GetXmlDocument(string settingsXml) return doc; } - #endregion } diff --git a/test/TranslationLayer.UnitTests/TestSessionTests.cs b/test/TranslationLayer.UnitTests/TestSessionTests.cs index 0ca9c20ac7..d62b0740f8 100644 --- a/test/TranslationLayer.UnitTests/TestSessionTests.cs +++ b/test/TranslationLayer.UnitTests/TestSessionTests.cs @@ -48,7 +48,6 @@ public void TestInitialize() _mockVsTestConsoleWrapper.Object); } - #region ITestSession [TestMethod] public void AbortTestRunShouldCallConsoleWrapperAbortTestRun() { @@ -342,9 +341,6 @@ public void StopTestSessionWithTwoArgsShouldCallConsoleWrapperStopTestSessionWit mockTestSessionEventsHandler2.Object), Times.Once); } - #endregion - - #region ITestSessionAsync [TestMethod] public async Task DiscoverTestsAsyncShouldCallConsoleWrapperDiscoverTestsWithCorrectArguments1() { @@ -623,5 +619,4 @@ await _testSession.StopTestSessionAsync( mockTestSessionEventsHandler2.Object), Times.Once); } - #endregion } diff --git a/test/TranslationLayer.UnitTests/VsTestConsoleRequestSenderTests.cs b/test/TranslationLayer.UnitTests/VsTestConsoleRequestSenderTests.cs index f2a2badd2a..b6e60a7494 100644 --- a/test/TranslationLayer.UnitTests/VsTestConsoleRequestSenderTests.cs +++ b/test/TranslationLayer.UnitTests/VsTestConsoleRequestSenderTests.cs @@ -53,8 +53,6 @@ public VsTestConsoleRequestSenderTests() new Mock().Object); } - #region Communication Tests - [TestMethod] public void InitializeCommunicationShouldSucceed() { @@ -318,10 +316,6 @@ public async Task InitializeCommunicationAsyncShouldFailConnectionIfProtocolIsNo _mockCommunicationManager.Verify(cm => cm.SendMessage(MessageType.VersionCheck, _protocolVersion), Times.Once); } - #endregion - - #region Discovery Tests - [TestMethod] public void DiscoverTestsShouldCompleteWithZeroTests() { @@ -716,10 +710,6 @@ public async Task DiscoverTestsAsyncShouldLogErrorWhenProcessExited() mockHandler.Verify(mh => mh.HandleLogMessage(TestMessageLevel.Error, It.IsAny()), Times.Once); } - #endregion - - #region RunTests - [TestMethod] public void StartTestRunShouldCompleteWithZeroTests() { @@ -1859,10 +1849,6 @@ public async Task StartTestRunAsyncShouldLogErrorOnProcessExited() mockHandler.Verify(mh => mh.HandleLogMessage(TestMessageLevel.Error, It.IsAny()), Times.Once); } - #endregion - - #region Attachments Processing Tests - [TestMethod] public async Task ProcessTestRunAttachmentsAsyncShouldCompleteWithZeroAttachments() { @@ -2142,9 +2128,6 @@ public async Task ProcessTestRunAttachmentsAsyncShouldAbortOnExceptionInSendMess _mockCommunicationManager.Verify(cm => cm.StopServer(), Times.Never); } - #endregion - - #region Sessions API private const int MinimumProtocolVersionWithTestSessionSupport = 5; private const int TesthostPid = 5000; @@ -2607,10 +2590,6 @@ await _requestSender.StartTestSessionAsync( It.IsAny()), Times.Once); } - #endregion - - #region Private Methods - /// /// Serialize and Deserialize message as it would happen for real. /// @@ -2698,5 +2677,4 @@ private async Task InitializeCommunicationAsync(int protocolVersion) Assert.AreEqual(dummyPortInput, portOutput, "Connection must succeed."); } - #endregion } diff --git a/test/datacollector.UnitTests/DataCollectionManagerTests.cs b/test/datacollector.UnitTests/DataCollectionManagerTests.cs index 614e281c7a..3698806084 100644 --- a/test/datacollector.UnitTests/DataCollectionManagerTests.cs +++ b/test/datacollector.UnitTests/DataCollectionManagerTests.cs @@ -423,8 +423,6 @@ public void SessionEndedShouldCancelProcessingAttachmentRequestsIfSessionIsCance _mockDataCollectionAttachmentManager.Verify(x => x.Cancel(), Times.Once); } - #region TestCaseEventsTest - [TestMethod] public void TestCaseStartedShouldSendEventToDataCollector() { @@ -487,7 +485,6 @@ private void SetupMockDataCollector(Action())).Callback(callback.Invoke); } - #endregion } internal class TestableDataCollectionManager : DataCollectionManager diff --git a/test/vstest.console.UnitTests/CommandLine/TestRunResultAggregatorTests.cs b/test/vstest.console.UnitTests/CommandLine/TestRunResultAggregatorTests.cs index 63c93c86db..e344e25a27 100644 --- a/test/vstest.console.UnitTests/CommandLine/TestRunResultAggregatorTests.cs +++ b/test/vstest.console.UnitTests/CommandLine/TestRunResultAggregatorTests.cs @@ -108,8 +108,6 @@ public void TestRunCompletionHandlerForAbortedRunShouldSetsOutcomeToFailed() Assert.AreEqual(TestOutcome.Failed, _resultAggregator.Outcome); } - #region Implementation - private class TestableTestRunStats : ITestRunStatistics { public TestableTestRunStats(Dictionary stats) @@ -139,5 +137,4 @@ public long this[TestOutcome testOutcome] } } - #endregion } diff --git a/test/vstest.console.UnitTests/Processors/CLIRunSettingsArgumentProcessorTests.cs b/test/vstest.console.UnitTests/Processors/CLIRunSettingsArgumentProcessorTests.cs index abfbac75e5..1b385b9f5d 100644 --- a/test/vstest.console.UnitTests/Processors/CLIRunSettingsArgumentProcessorTests.cs +++ b/test/vstest.console.UnitTests/Processors/CLIRunSettingsArgumentProcessorTests.cs @@ -81,8 +81,6 @@ public void GetExecuterShouldReturnRunSettingsArgumentProcessorCapabilities() Assert.IsTrue(processor.Executor.Value is CliRunSettingsArgumentExecutor); } - #region CLIRunSettingsArgumentProcessorCapabilities tests - [TestMethod] public void CapabilitiesShouldReturnAppropriateProperties() { @@ -101,10 +99,6 @@ public void CapabilitiesShouldReturnAppropriateProperties() Assert.IsFalse(capabilities.IsSpecialCommand); } - #endregion - - #region CLIRunSettingsArgumentExecutor tests - [TestMethod] public void InitializeShouldNotThrowExceptionIfArgumentIsNull() { @@ -425,8 +419,6 @@ public static IEnumerable TestRunParameterArgValidTestCases() "") }, }; - #endregion - [TestMethod] public void InitializeShouldMergeTestRunParametersWithSpaces() { diff --git a/test/vstest.console.UnitTests/Processors/CollectArgumentProcessorTests.cs b/test/vstest.console.UnitTests/Processors/CollectArgumentProcessorTests.cs index fe9242251c..133e04546e 100644 --- a/test/vstest.console.UnitTests/Processors/CollectArgumentProcessorTests.cs +++ b/test/vstest.console.UnitTests/Processors/CollectArgumentProcessorTests.cs @@ -58,8 +58,6 @@ public void GetExecuterShouldReturnCollectArgumentProcessorCapabilities() Assert.IsTrue(processor.Executor.Value is CollectArgumentExecutor); } - #region CollectArgumentProcessorCapabilities tests - [TestMethod] public void CapabilitiesShouldReturnAppropriateProperties() { @@ -80,10 +78,6 @@ public void CapabilitiesShouldReturnAppropriateProperties() Assert.IsFalse(capabilities.IsSpecialCommand); } - #endregion - - #region CollectArgumentExecutor tests - [TestMethod] public void InitializeShouldThrowIfArguemntIsNull() { @@ -708,5 +702,4 @@ public void InitializeShouldUpdateConfigurationsForExistingDataCollectorInRunSet " ", ""), _settingsProvider.ActiveRunSettings.SettingsXml); } - #endregion } diff --git a/test/vstest.console.UnitTests/Processors/EnableCodeCoverageArgumentProcessorTests.cs b/test/vstest.console.UnitTests/Processors/EnableCodeCoverageArgumentProcessorTests.cs index 8fbb8b845a..046e1ab8a4 100644 --- a/test/vstest.console.UnitTests/Processors/EnableCodeCoverageArgumentProcessorTests.cs +++ b/test/vstest.console.UnitTests/Processors/EnableCodeCoverageArgumentProcessorTests.cs @@ -52,8 +52,6 @@ public void GetExecuterShouldReturnEnableCodeCoverageArgumentProcessorCapabiliti Assert.IsTrue(processor.Executor.Value is EnableCodeCoverageArgumentExecutor); } - #region EnableCodeCoverageArgumentProcessorCapabilities tests - [TestMethod] public void CapabilitiesShouldReturnAppropriateProperties() { @@ -68,10 +66,6 @@ public void CapabilitiesShouldReturnAppropriateProperties() Assert.IsFalse(capabilities.IsSpecialCommand); } - #endregion - - #region EnableCodeCoverageArgumentExecutor tests - [TestMethod] public void InitializeShouldSetEnableCodeCoverageOfCommandLineOption() { @@ -175,5 +169,4 @@ public void InitializeShouldNotEnableOtherDataCollectors() ""), _settingsProvider.ActiveRunSettings.SettingsXml); } - #endregion } diff --git a/test/vstest.console.UnitTests/Processors/FrameworkArgumentProcessorTests.cs b/test/vstest.console.UnitTests/Processors/FrameworkArgumentProcessorTests.cs index 6aa6b2966e..e1eff980f3 100644 --- a/test/vstest.console.UnitTests/Processors/FrameworkArgumentProcessorTests.cs +++ b/test/vstest.console.UnitTests/Processors/FrameworkArgumentProcessorTests.cs @@ -45,8 +45,6 @@ public void GetExecuterShouldReturnFrameworkArgumentExecutor() Assert.IsTrue(processor.Executor.Value is FrameworkArgumentExecutor); } - #region FrameworkArgumentProcessorCapabilities tests - [TestMethod] public void CapabilitiesShouldReturnAppropriateProperties() { @@ -63,10 +61,6 @@ public void CapabilitiesShouldReturnAppropriateProperties() Assert.IsFalse(capabilities.IsSpecialCommand); } - #endregion - - #region FrameworkArgumentExecutor Initialize tests - [TestMethod] public void InitializeShouldThrowIfArgumentIsNull() { @@ -127,16 +121,10 @@ public void InitializeShouldNotSetFrameworkIfSettingsFileIsLegacy() Assert.AreEqual(nameof(FrameworkVersion.Framework45), _runSettingsProvider.QueryRunSettingsNode(FrameworkArgumentExecutor.RunSettingsPath)); } - #endregion - - #region FrameworkArgumentExecutor Execute tests - [TestMethod] public void ExecuteShouldReturnSuccess() { Assert.AreEqual(ArgumentProcessorResult.Success, _executor.Execute()); } - #endregion - } diff --git a/test/vstest.console.UnitTests/Processors/HelpArgumentProcessorTests.cs b/test/vstest.console.UnitTests/Processors/HelpArgumentProcessorTests.cs index b0cff1ed6b..cf07c521ad 100644 --- a/test/vstest.console.UnitTests/Processors/HelpArgumentProcessorTests.cs +++ b/test/vstest.console.UnitTests/Processors/HelpArgumentProcessorTests.cs @@ -36,8 +36,6 @@ public void GetExecuterShouldReturnHelpArgumentProcessorCapabilities() Assert.IsTrue(processor.Executor.Value is HelpArgumentExecutor); } - #region HelpArgumentProcessorCapabilitiesTests - [TestMethod] public void CapabilitiesShouldAppropriateProperties() { @@ -54,8 +52,6 @@ public void CapabilitiesShouldAppropriateProperties() Assert.IsFalse(capabilities.IsSpecialCommand); } - #endregion - [TestMethod] public void ExecuterExecuteReturnArgumentProcessorResultAbort() { diff --git a/test/vstest.console.UnitTests/Processors/ListFullyQualifiedTestsArgumentProcessorTests.cs b/test/vstest.console.UnitTests/Processors/ListFullyQualifiedTestsArgumentProcessorTests.cs index 1cc20c918f..542ccb498b 100644 --- a/test/vstest.console.UnitTests/Processors/ListFullyQualifiedTestsArgumentProcessorTests.cs +++ b/test/vstest.console.UnitTests/Processors/ListFullyQualifiedTestsArgumentProcessorTests.cs @@ -111,8 +111,6 @@ public void GetExecuterShouldReturnListFullyQualifiedTestsArgumentProcessorCapab Assert.IsTrue(processor.Executor.Value is ListFullyQualifiedTestsArgumentExecutor); } - #region ListTestsArgumentProcessorCapabilitiesTests - [TestMethod] public void CapabilitiesShouldReturnAppropriateProperties() { @@ -126,10 +124,6 @@ public void CapabilitiesShouldReturnAppropriateProperties() Assert.IsFalse(capabilities.AlwaysExecute); Assert.IsFalse(capabilities.IsSpecialCommand); } - #endregion - - #region ListTestsArgumentExecutorTests - [TestMethod] public void ExecutorInitializeWithValidSourceShouldAddItToTestSources() { @@ -288,8 +282,6 @@ public void ListFullyQualifiedTestsArgumentProcessorExecuteShouldInstrumentDisco _mockTestPlatformEventSource.Verify(x => x.DiscoveryRequestStop(), Times.Once); } - #endregion - private void RunListFullyQualifiedTestArgumentProcessorWithTraits(Mock mockDiscoveryRequest, Mock mockConsoleOutput, bool legitPath = true) { var mockTestPlatform = new Mock(); diff --git a/test/vstest.console.UnitTests/Processors/ListTestsArgumentProcessorTests.cs b/test/vstest.console.UnitTests/Processors/ListTestsArgumentProcessorTests.cs index bf0e0768ec..3fe43c7cc0 100644 --- a/test/vstest.console.UnitTests/Processors/ListTestsArgumentProcessorTests.cs +++ b/test/vstest.console.UnitTests/Processors/ListTestsArgumentProcessorTests.cs @@ -109,8 +109,6 @@ public void GetExecuterShouldReturnListTestsArgumentProcessorCapabilities() Assert.IsTrue(processor.Executor.Value is ListTestsArgumentExecutor); } - #region ListTestsArgumentProcessorCapabilitiesTests - [TestMethod] public void CapabilitiesShouldReturnAppropriateProperties() { @@ -128,10 +126,6 @@ public void CapabilitiesShouldReturnAppropriateProperties() Assert.IsFalse(capabilities.AlwaysExecute); Assert.IsFalse(capabilities.IsSpecialCommand); } - #endregion - - #region ListTestsArgumentExecutorTests - [TestMethod] public void ExecutorInitializeWithValidSourceShouldAddItToTestSources() { @@ -260,8 +254,6 @@ public void ListTestArgumentProcessorExecuteShouldInstrumentDiscoveryRequestStop _mockTestPlatformEventSource.Verify(x => x.DiscoveryRequestStop(), Times.Once); } - #endregion - private void RunListTestArgumentProcessorExecuteWithMockSetup(Mock mockDiscoveryRequest, Mock mockConsoleOutput) { var mockTestPlatform = new Mock(); diff --git a/test/vstest.console.UnitTests/Processors/ListTestsTargetPathArgumentProcessorTests.cs b/test/vstest.console.UnitTests/Processors/ListTestsTargetPathArgumentProcessorTests.cs index 91b8a895e2..a67951c9e2 100644 --- a/test/vstest.console.UnitTests/Processors/ListTestsTargetPathArgumentProcessorTests.cs +++ b/test/vstest.console.UnitTests/Processors/ListTestsTargetPathArgumentProcessorTests.cs @@ -28,8 +28,6 @@ public void GetExecutorShouldReturnListTestsTargetPathArgumentProcessorCapabilit Assert.IsTrue(processor.Executor.Value is ListTestsTargetPathArgumentExecutor); } - #region TestCaseFilterArgumentProcessorCapabilitiesTests - [TestMethod] public void CapabilitiesShouldAppropriateProperties() { @@ -44,8 +42,6 @@ public void CapabilitiesShouldAppropriateProperties() Assert.IsFalse(capabilities.IsSpecialCommand); } - #endregion - [TestMethod] public void ExecutorInitializeWithNullOrEmptyListTestsTargetPathShouldThrowCommandLineException() { diff --git a/test/vstest.console.UnitTests/Processors/ParallelArgumentProcessorTests.cs b/test/vstest.console.UnitTests/Processors/ParallelArgumentProcessorTests.cs index e4595d0383..83171462af 100644 --- a/test/vstest.console.UnitTests/Processors/ParallelArgumentProcessorTests.cs +++ b/test/vstest.console.UnitTests/Processors/ParallelArgumentProcessorTests.cs @@ -44,8 +44,6 @@ public void GetExecuterShouldReturnParallelArgumentExecutor() Assert.IsTrue(processor.Executor.Value is ParallelArgumentExecutor); } - #region ParallelArgumentProcessorCapabilities tests - [TestMethod] public void CapabilitiesShouldReturnAppropriateProperties() { @@ -63,10 +61,6 @@ public void CapabilitiesShouldReturnAppropriateProperties() Assert.IsFalse(capabilities.IsSpecialCommand); } - #endregion - - #region ParallelArgumentExecutor Initialize tests - [TestMethod] public void InitializeShouldThrowIfArgumentIsNonNull() { @@ -85,15 +79,10 @@ public void InitializeShouldSetParallelValue() Assert.AreEqual("0", _runSettingsProvider.QueryRunSettingsNode(ParallelArgumentExecutor.RunSettingsPath)); } - #endregion - - #region ParallelArgumentExecutor Execute tests - [TestMethod] public void ExecuteShouldReturnSuccess() { Assert.AreEqual(ArgumentProcessorResult.Success, _executor.Execute()); } - #endregion } diff --git a/test/vstest.console.UnitTests/Processors/PlatformArgumentProcessorTests.cs b/test/vstest.console.UnitTests/Processors/PlatformArgumentProcessorTests.cs index 6f83c1f424..899f29279e 100644 --- a/test/vstest.console.UnitTests/Processors/PlatformArgumentProcessorTests.cs +++ b/test/vstest.console.UnitTests/Processors/PlatformArgumentProcessorTests.cs @@ -44,8 +44,6 @@ public void GetExecuterShouldReturnPlatformArgumentExecutor() Assert.IsTrue(processor.Executor.Value is PlatformArgumentExecutor); } - #region PlatformArgumentProcessorCapabilities tests - [TestMethod] public void CapabilitiesShouldReturnAppropriateProperties() { @@ -63,10 +61,6 @@ public void CapabilitiesShouldReturnAppropriateProperties() Assert.IsFalse(capabilities.IsSpecialCommand); } - #endregion - - #region PlatformArgumentExecutor Initialize tests - [TestMethod] public void InitializeShouldThrowIfArgumentIsNull() { @@ -117,15 +111,10 @@ public void InitializeShouldNotConsiderCaseSensitivityOfTheArgumentPassed() Assert.AreEqual(nameof(ObjectModel.Architecture.ARM), _runSettingsProvider.QueryRunSettingsNode(PlatformArgumentExecutor.RunSettingsPath)); } - #endregion - - #region PlatformArgumentExecutor Execute tests - [TestMethod] public void ExecuteShouldReturnSuccess() { Assert.AreEqual(ArgumentProcessorResult.Success, _executor.Execute()); } - #endregion } diff --git a/test/vstest.console.UnitTests/Processors/PortArgumentProcessorTests.cs b/test/vstest.console.UnitTests/Processors/PortArgumentProcessorTests.cs index 5e4c2ad6b9..29c4c1c8e4 100644 --- a/test/vstest.console.UnitTests/Processors/PortArgumentProcessorTests.cs +++ b/test/vstest.console.UnitTests/Processors/PortArgumentProcessorTests.cs @@ -44,8 +44,6 @@ public void GetExecutorShouldReturnPortArgumentProcessorCapabilities() Assert.IsTrue(processor.Executor.Value is PortArgumentExecutor); } - #region PortArgumentProcessorCapabilitiesTests - [TestMethod] public void CapabilitiesShouldAppropriateProperties() { @@ -62,8 +60,6 @@ public void CapabilitiesShouldAppropriateProperties() Assert.IsFalse(capabilities.IsSpecialCommand); } - #endregion - [TestMethod] public void ExecutorInitializeWithNullOrEmptyPortShouldThrowCommandLineException() { diff --git a/test/vstest.console.UnitTests/Processors/ResponseFileArgumentProcessorTests.cs b/test/vstest.console.UnitTests/Processors/ResponseFileArgumentProcessorTests.cs index 226c4ec876..94a37d2280 100644 --- a/test/vstest.console.UnitTests/Processors/ResponseFileArgumentProcessorTests.cs +++ b/test/vstest.console.UnitTests/Processors/ResponseFileArgumentProcessorTests.cs @@ -32,8 +32,6 @@ public void GetExecuterShouldReturnNull() Assert.IsNull(processor.Executor); } - #region ResponseFileArgumentProcessorCapabilities tests - [TestMethod] public void CapabilitiesShouldReturnAppropriateProperties() { @@ -50,5 +48,4 @@ public void CapabilitiesShouldReturnAppropriateProperties() Assert.IsTrue(capabilities.IsSpecialCommand); } - #endregion } diff --git a/test/vstest.console.UnitTests/Processors/ResultsDirectoryArgumentProcessorTests.cs b/test/vstest.console.UnitTests/Processors/ResultsDirectoryArgumentProcessorTests.cs index 21105897ee..a9297d914a 100644 --- a/test/vstest.console.UnitTests/Processors/ResultsDirectoryArgumentProcessorTests.cs +++ b/test/vstest.console.UnitTests/Processors/ResultsDirectoryArgumentProcessorTests.cs @@ -50,8 +50,6 @@ public void GetExecuterShouldReturnResultsDirectoryArgumentExecutor() Assert.IsTrue(processor.Executor.Value is ResultsDirectoryArgumentExecutor); } - #region ResultsDirectoryArgumentProcessorCapabilities tests - [TestMethod] public void CapabilitiesShouldReturnAppropriateProperties() { @@ -69,10 +67,6 @@ public void CapabilitiesShouldReturnAppropriateProperties() Assert.IsFalse(capabilities.IsSpecialCommand); } - #endregion - - #region ResultsDirectoryArgumentExecutor Initialize tests - [TestMethod] public void InitializeShouldThrowIfArgumentIsNull() { @@ -148,18 +142,12 @@ public void InitializeShouldSetCommandLineOptionsAndRunSettingsForAbsolutePathVa Assert.AreEqual(absolutePath, _runSettingsProvider.QueryRunSettingsNode(ResultsDirectoryArgumentExecutor.RunSettingsPath)); } - #endregion - - #region ResultsDirectoryArgumentExecutor Execute tests - [TestMethod] public void ExecuteShouldReturnSuccess() { Assert.AreEqual(ArgumentProcessorResult.Success, _executor.Execute()); } - #endregion - private string TranslatePath(string path) { // RuntimeInformation has conflict when used diff --git a/test/vstest.console.UnitTests/Processors/RunSettingsArgumentProcessorTests.cs b/test/vstest.console.UnitTests/Processors/RunSettingsArgumentProcessorTests.cs index acfe0af65d..de93b4de24 100644 --- a/test/vstest.console.UnitTests/Processors/RunSettingsArgumentProcessorTests.cs +++ b/test/vstest.console.UnitTests/Processors/RunSettingsArgumentProcessorTests.cs @@ -55,8 +55,6 @@ public void GetExecuterShouldReturnRunSettingsArgumentExecutor() Assert.IsTrue(processor.Executor.Value is RunSettingsArgumentExecutor); } - #region RunSettingsArgumentProcessorCapabilities tests - [TestMethod] public void CapabilitiesShouldReturnAppropriateProperties() { @@ -74,10 +72,6 @@ public void CapabilitiesShouldReturnAppropriateProperties() Assert.IsFalse(capabilities.IsSpecialCommand); } - #endregion - - #region RunSettingsArgumentExecutor tests - [TestMethod] public void InitializeShouldThrowExceptionIfArgumentIsNull() { @@ -408,10 +402,6 @@ public void InitializeShouldUpdateTestCaseFilterIfProvided() // Assert. Assert.AreEqual(filter, CommandLineOptions.Instance.TestCaseFilterValue); } - #endregion - - #region Testable Implementations - private class TestableRunSettingsArgumentExecutor : RunSettingsArgumentExecutor { private readonly string _runSettingsString; @@ -440,5 +430,4 @@ protected override XmlReader GetReaderForFile(string runSettingsFile) } } - #endregion } diff --git a/test/vstest.console.UnitTests/Processors/RunSpecificTestsArgumentProcessorTests.cs b/test/vstest.console.UnitTests/Processors/RunSpecificTestsArgumentProcessorTests.cs index 0bf445effc..d8bb4d30ba 100644 --- a/test/vstest.console.UnitTests/Processors/RunSpecificTestsArgumentProcessorTests.cs +++ b/test/vstest.console.UnitTests/Processors/RunSpecificTestsArgumentProcessorTests.cs @@ -95,8 +95,6 @@ public void GetExecutorShouldReturnRunSpecificTestsArgumentExecutor() Assert.IsTrue(processor.Executor.Value is RunSpecificTestsArgumentExecutor); } - #region RunSpecificTestsArgumentProcessorCapabilitiesTests - [TestMethod] public void CapabilitiesShouldReturnAppropriateProperties() { @@ -113,10 +111,6 @@ public void CapabilitiesShouldReturnAppropriateProperties() Assert.IsFalse(capabilities.AlwaysExecute); Assert.IsFalse(capabilities.IsSpecialCommand); } - #endregion - - #region RunSpecificTestsArgumentExecutorTests - [TestMethod] public void InitializeShouldThrowIfArgumentIsNull() { @@ -600,8 +594,6 @@ public void ExecutorShouldNotDisplayWarningIfTestsAreExecuted() _mockOutput.Verify(op => op.WriteLine(It.Is(st => st.Contains("Additionally, path to test adapters can be specified using /TestAdapterPath command.")), OutputLevel.Warning), Times.Never); } - #endregion - private void ResetAndAddSourceToCommandLineOptions() { CommandLineOptions.Instance.Reset(); diff --git a/test/vstest.console.UnitTests/Processors/RunTestsArgumentProcessorTests.cs b/test/vstest.console.UnitTests/Processors/RunTestsArgumentProcessorTests.cs index fa1ae43a8d..fb26f94a0f 100644 --- a/test/vstest.console.UnitTests/Processors/RunTestsArgumentProcessorTests.cs +++ b/test/vstest.console.UnitTests/Processors/RunTestsArgumentProcessorTests.cs @@ -89,8 +89,6 @@ public void GetExecuterShouldReturnRunTestsArgumentProcessorCapabilities() Assert.IsTrue(processor.Executor.Value is RunTestsArgumentExecutor); } - #region RunTestsArgumentProcessorCapabilitiesTests - [TestMethod] public void CapabilitiesShouldReturnAppropriateProperties() { @@ -107,10 +105,6 @@ public void CapabilitiesShouldReturnAppropriateProperties() Assert.IsFalse(capabilities.AlwaysExecute); Assert.IsTrue(capabilities.IsSpecialCommand); } - #endregion - - #region RunTestsArgumentExecutorTests - [TestMethod] public void ExecutorExecuteShouldReturnSuccessWithoutExecutionInDesignMode() { @@ -244,8 +238,6 @@ public void TestRunRequestManagerShouldInstrumentExecutionRequestStop() _mockTestPlatformEventSource.Verify(x => x.ExecutionRequestStop(), Times.Once); } - #endregion - private ArgumentProcessorResult RunRunArgumentProcessorExecuteWithMockSetup(ITestRunRequest testRunRequest) { var mockTestPlatform = new Mock(); @@ -330,10 +322,6 @@ private void TestMessageHandler(object sender, TestRunMessageEventArgs e) } } -#region Testable implementation - public class TestableTestPluginCache : TestPluginCache { } - -#endregion diff --git a/test/vstest.console.UnitTests/Processors/TestAdapterPathArgumentProcessorTests.cs b/test/vstest.console.UnitTests/Processors/TestAdapterPathArgumentProcessorTests.cs index 0a43616288..a0b4b79493 100644 --- a/test/vstest.console.UnitTests/Processors/TestAdapterPathArgumentProcessorTests.cs +++ b/test/vstest.console.UnitTests/Processors/TestAdapterPathArgumentProcessorTests.cs @@ -54,8 +54,6 @@ public void GetExecuterShouldReturnTestAdapterPathArgumentProcessorCapabilities( Assert.IsTrue(processor.Executor.Value is TestAdapterPathArgumentExecutor); } - #region TestAdapterPathArgumentProcessorCapabilities tests - [TestMethod] public void CapabilitiesShouldReturnAppropriateProperties() { @@ -73,10 +71,6 @@ public void CapabilitiesShouldReturnAppropriateProperties() Assert.IsFalse(capabilities.IsSpecialCommand); } - #endregion - - #region TestAdapterPathArgumentExecutor tests - [TestMethod] public void InitializeShouldThrowIfArgumentIsNull() { @@ -308,10 +302,6 @@ public void InitializeShouldTrimTrailingAndLeadingDoubleQuotes() } - #endregion - - #region Testable implementations - private class TestableTestAdapterPathArgumentExecutor : TestAdapterPathArgumentExecutor { internal TestableTestAdapterPathArgumentExecutor(CommandLineOptions options, IRunSettingsProvider runSettingsProvider, IOutput output, IFileHelper fileHelper) @@ -322,5 +312,4 @@ internal TestableTestAdapterPathArgumentExecutor(CommandLineOptions options, IRu internal Func> TestAdapters { get; set; } } - #endregion } diff --git a/test/vstest.console.UnitTests/Processors/TestCaseFilterArgumentProcessorTests.cs b/test/vstest.console.UnitTests/Processors/TestCaseFilterArgumentProcessorTests.cs index 9b49ad62ad..ab68208d17 100644 --- a/test/vstest.console.UnitTests/Processors/TestCaseFilterArgumentProcessorTests.cs +++ b/test/vstest.console.UnitTests/Processors/TestCaseFilterArgumentProcessorTests.cs @@ -28,8 +28,6 @@ public void GetExecutorShouldReturnTestCaseFilterArgumentProcessorCapabilities() Assert.IsTrue(processor.Executor.Value is TestCaseFilterArgumentExecutor); } - #region TestCaseFilterArgumentProcessorCapabilitiesTests - [TestMethod] public void CapabilitiesShouldAppropriateProperties() { @@ -46,8 +44,6 @@ public void CapabilitiesShouldAppropriateProperties() Assert.IsFalse(capabilities.IsSpecialCommand); } - #endregion - [TestMethod] public void ExecutorInitializeWithNullOrEmptyTestCaseFilterShouldThrowCommandLineException() { diff --git a/test/vstest.console.UnitTests/Processors/TestSourceArgumentProcessorTests.cs b/test/vstest.console.UnitTests/Processors/TestSourceArgumentProcessorTests.cs index 685c6f6d5e..d0fdcc74fc 100644 --- a/test/vstest.console.UnitTests/Processors/TestSourceArgumentProcessorTests.cs +++ b/test/vstest.console.UnitTests/Processors/TestSourceArgumentProcessorTests.cs @@ -43,8 +43,6 @@ public void GetExecuterShouldReturnTestSourceArgumentProcessorCapabilities() Assert.IsTrue(processor.Executor.Value is TestSourceArgumentExecutor); } - #region TestSourceArgumentProcessorCapabilitiesTests - [TestMethod] public void CapabilitiesShouldReturnAppropriateProperties() { @@ -61,10 +59,6 @@ public void CapabilitiesShouldReturnAppropriateProperties() Assert.IsTrue(capabilities.IsSpecialCommand); } - #endregion - - #region TestSourceArgumentExecutorTests - [TestMethod] public void ExecuterInitializeWithInvalidSourceShouldThrowCommandLineException() { @@ -117,5 +111,4 @@ public void ExecutorExecuteReturnArgumentProcessorResultSuccess() Assert.AreEqual(ArgumentProcessorResult.Success, result); } - #endregion } diff --git a/test/vstest.console.UnitTests/Processors/UseVsixExtensionsArgumentProcessorTests.cs b/test/vstest.console.UnitTests/Processors/UseVsixExtensionsArgumentProcessorTests.cs index 61171a37a8..158d2c88bf 100644 --- a/test/vstest.console.UnitTests/Processors/UseVsixExtensionsArgumentProcessorTests.cs +++ b/test/vstest.console.UnitTests/Processors/UseVsixExtensionsArgumentProcessorTests.cs @@ -47,8 +47,6 @@ public void GetExecuterShouldReturnUseVsixExtensionsArgumentProcessorCapabilitie Assert.IsTrue(processor.Executor.Value is UseVsixExtensionsArgumentExecutor); } - #region UseVsixExtensionsArgumentProcessorCapabilities tests - [TestMethod] public void CapabilitiesShouldReturnAppropriateProperties() { @@ -65,10 +63,6 @@ public void CapabilitiesShouldReturnAppropriateProperties() Assert.IsFalse(capabilities.IsSpecialCommand); } - #endregion - - #region UseVsixExtensionsArgumentExecutor tests - [TestMethod] public void InitializeShouldThrowExceptionIfArgumentIsNull() { @@ -108,5 +102,4 @@ public void InitializeForArgumentEqualfalseShouldNotCallTestRequestManagerInitia _testRequestManager.Verify(trm => trm.InitializeExtensions(It.IsAny>(), true), Times.Never); } - #endregion }