Skip to content

Commit e96d749

Browse files
committed
Fix some missing xml docs
1 parent 9165781 commit e96d749

File tree

14 files changed

+46
-12
lines changed

14 files changed

+46
-12
lines changed

Directory.Build.props

-8
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,6 @@
1313
<LangVersion>preview</LangVersion>
1414
<ImplicitUsings>enable</ImplicitUsings>
1515
<GenerateDocumentationFile>true</GenerateDocumentationFile>
16-
<!--
17-
Make sure any documentation comments which are included in code get checked for syntax during the build, but do
18-
not report warnings for missing comments.
19-
20-
CS1573: Parameter 'parameter' has no matching param tag in the XML comment for 'parameter' (but other parameters do)
21-
CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member'
22-
-->
23-
<NoWarn>$(NoWarn),1573,1591</NoWarn>
2416
</PropertyGroup>
2517

2618
<!-- The TFMs to build and test against. -->

src/Adapter/MSTest.TestAdapter/Execution/TestClassInfo.cs

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ public class TestClassInfo
3838
/// </summary>
3939
/// <param name="type">Underlying test class type.</param>
4040
/// <param name="constructor">Constructor for the test class.</param>
41+
/// <param name="isParameterlessConstructor">Whether or not the test class constructor has no parameters.</param>
4142
/// <param name="classAttribute">Test class attribute.</param>
4243
/// <param name="parent">Parent assembly info.</param>
4344
internal TestClassInfo(

src/Adapter/MSTest.TestAdapter/Execution/TestMethodInfo.cs

+4
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,7 @@ private void ThrowMultipleAttributesException(string attributeName)
302302
/// Execute test without timeout.
303303
/// </summary>
304304
/// <param name="arguments">Arguments to be passed to the method.</param>
305+
/// <param name="timeoutTokenSource">The timeout token source.</param>
305306
/// <returns>The result of the execution.</returns>
306307
[SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Requirement is to handle all kinds of user exceptions and message appropriately.")]
307308
private TestResult ExecuteInternal(object?[]? arguments, CancellationTokenSource? timeoutTokenSource)
@@ -490,6 +491,7 @@ private static Exception GetRealException(Exception ex)
490491
/// be expected or not expected.
491492
/// </summary>
492493
/// <param name="ex">Exception that was thrown.</param>
494+
/// <param name="realException">Real exception thrown by the test method.</param>
493495
/// <param name="className">The class name.</param>
494496
/// <param name="methodName">The method name.</param>
495497
/// <returns>Test framework exception with details.</returns>
@@ -561,6 +563,7 @@ private static TestFailedException HandleMethodException(Exception ex, Exception
561563
/// Runs TestCleanup methods of parent TestClass and base classes.
562564
/// </summary>
563565
/// <param name="result">Instance of TestResult.</param>
566+
/// <param name="timeoutTokenSource">The timeout token source.</param>
564567
[SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Requirement is to handle all kinds of user exceptions and message appropriately.")]
565568
private void RunTestCleanupMethod(TestResult result, CancellationTokenSource? timeoutTokenSource)
566569
{
@@ -696,6 +699,7 @@ private void RunTestCleanupMethod(TestResult result, CancellationTokenSource? ti
696699
/// </summary>
697700
/// <param name="classInstance">Instance of TestClass.</param>
698701
/// <param name="result">Instance of TestResult.</param>
702+
/// <param name="timeoutTokenSource">The timeout token source.</param>
699703
/// <returns>True if the TestInitialize method(s) did not throw an exception.</returns>
700704
[SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Requirement is to handle all kinds of user exceptions and message appropriately.")]
701705
private bool RunTestInitializeMethod(object classInstance, TestResult result, CancellationTokenSource? timeoutTokenSource)

src/Adapter/MSTest.TestAdapter/Execution/UnitTestRunner.cs

+5
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ internal sealed class UnitTestRunner : MarshalByRefObject
3131
/// Initializes a new instance of the <see cref="UnitTestRunner"/> class.
3232
/// </summary>
3333
/// <param name="settings"> Specifies adapter settings that need to be instantiated in the domain running these tests. </param>
34+
/// <param name="testsToRun"> The tests to run. </param>
35+
/// <param name="classCleanupLifecycle"> The class cleanup lifecycle. </param>
3436
public UnitTestRunner(MSTestSettings settings, UnitTestElement[] testsToRun, int? classCleanupLifecycle)
3537
: this(settings, testsToRun, classCleanupLifecycle, ReflectHelper.Instance)
3638
{
@@ -40,6 +42,8 @@ public UnitTestRunner(MSTestSettings settings, UnitTestElement[] testsToRun, int
4042
/// Initializes a new instance of the <see cref="UnitTestRunner"/> class.
4143
/// </summary>
4244
/// <param name="settings"> Specifies adapter settings. </param>
45+
/// <param name="testsToRun"> The tests to run. </param>
46+
/// <param name="classCleanupLifecycle"> The class cleanup lifecycle. </param>
4347
/// <param name="reflectHelper"> The reflect Helper. </param>
4448
internal UnitTestRunner(MSTestSettings settings, UnitTestElement[] testsToRun, int? classCleanupLifecycle, ReflectHelper reflectHelper)
4549
{
@@ -134,6 +138,7 @@ internal TestResult[] RunSingleTest(TestMethod testMethod, IDictionary<string, o
134138
/// </summary>
135139
/// <param name="testMethod"> The test Method. </param>
136140
/// <param name="testContextProperties"> The test context properties. </param>
141+
/// <param name="messageLogger"> The message logger. </param>
137142
/// <returns> The <see cref="TestResult"/>. </returns>
138143
internal async Task<TestResult[]> RunSingleTestAsync(TestMethod testMethod, IDictionary<string, object?> testContextProperties, IMessageLogger messageLogger)
139144
{

src/Adapter/MSTest.TestAdapter/IPlatformServiceProvider.cs

+5
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ internal interface IPlatformServiceProvider
5959
/// </summary>
6060
TestRunCancellationToken? TestRunCancellationToken { get; set; }
6161

62+
/// <summary>
63+
/// Gets or sets a value indicating whether a graceful stop is requested.
64+
/// </summary>
6265
bool IsGracefulStopRequested { get; set; }
6366

6467
/// <summary>
@@ -120,6 +123,8 @@ ITestSourceHost CreateTestSourceHost(
120123
/// <param name="properties">
121124
/// The default set of properties the test context needs to be filled with.
122125
/// </param>
126+
/// <param name="messageLogger">The message logger.</param>
127+
/// <param name="outcome">The test outcome.</param>
123128
/// <returns>
124129
/// The <see cref="ITestContext"/> instance.
125130
/// </returns>

src/Adapter/MSTest.TestAdapter/MSTestSettings.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -292,10 +292,9 @@ private static bool IsRunSettingsFileHasSettingName(string? runSettingsXml, stri
292292
/// <summary>
293293
/// Populate adapter settings from the context.
294294
/// </summary>
295-
/// <param name="context">
295+
/// <param name="context">The discovery context.</param>
296296
/// <param name="logger"> The logger for messages. </param>
297-
/// The discovery context that contains the runsettings.
298-
/// </param>
297+
/// <param name="configuration">The configuration.</param>
299298
internal static void PopulateSettings(IDiscoveryContext? context, IMessageLogger? logger, IConfiguration? configuration)
300299
{
301300
#if !WINDOWS_UWP
@@ -916,6 +915,7 @@ private static void ParseIntegerSetting(IConfiguration configuration, string key
916915
/// </summary>
917916
/// <param name="configuration">Configuration to load the settings from.</param>
918917
/// <param name="logger"> The logger for messages. </param>
918+
/// <param name="settings">The MSTest settings.</param>
919919
internal static void SetSettingsFromConfig(IConfiguration configuration, IMessageLogger? logger, MSTestSettings settings)
920920
{
921921
// Expected format of the json is: -

src/Adapter/MSTest.TestAdapter/PlatformServiceProvider.cs

+2
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,8 @@ public ITestSourceHost CreateTestSourceHost(
191191
/// <param name="properties">
192192
/// The default set of properties the test context needs to be filled with.
193193
/// </param>
194+
/// <param name="messageLogger">The message logger.</param>
195+
/// <param name="outcome">The test outcome.</param>
194196
/// <returns>
195197
/// The <see cref="ITestContext"/> instance.
196198
/// </returns>

src/Adapter/MSTest.TestAdapter/TestingPlatformAdapter/TestApplicationBuilderExtensions.cs

+8
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,17 @@
1111

1212
namespace Microsoft.VisualStudio.TestTools.UnitTesting;
1313

14+
/// <summary>
15+
/// Extension methods for <see cref="ITestApplicationBuilder"/>.
16+
/// </summary>
1417
[SuppressMessage("ApiDesign", "RS0030:Do not use banned APIs", Justification = "We can use MTP from this folder")]
1518
public static class TestApplicationBuilderExtensions
1619
{
20+
/// <summary>
21+
/// Register MSTest as the test framework and register the necessary services.
22+
/// </summary>
23+
/// <param name="testApplicationBuilder">The test application builder on which to register.</param>
24+
/// <param name="getTestAssemblies">The function to get the test assemblies.</param>
1725
public static void AddMSTest(this ITestApplicationBuilder testApplicationBuilder, Func<IEnumerable<Assembly>> getTestAssemblies)
1826
{
1927
MSTestExtension extension = new();

src/Adapter/MSTestAdapter.PlatformServices/Deployment/AssemblyLoadWorker.cs

+1
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ public IReadOnlyCollection<string> GetFullPathToDependentAssemblies(string assem
7979
/// Get the target dotNet framework string for the assembly.
8080
/// </summary>
8181
/// <param name="path">Path of the assembly file.</param>
82+
/// <param name="errorMessage">Error message if any.</param>
8283
/// <returns> String representation of the target dotNet framework e.g. .NETFramework,Version=v4.0. </returns>
8384
internal string GetTargetFrameworkVersionStringFromPath(string path, out string? errorMessage)
8485
{

src/Analyzers/MSTest.Analyzers/RoslynAnalyzerHelpers/CompilationExtensions.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ internal static class CompilationExtensions
2121
/// </summary>
2222
/// <param name="compilation">The compilation.</param>
2323
/// <param name="fullTypeName">Namespace + type name, e.g. "System.Exception".</param>
24-
/// <returns>The <see cref="INamedTypeSymbol"/> if found, null otherwise.</returns>
24+
/// <param name="namedTypeSymbol">The <see cref="INamedTypeSymbol"/> if found, null otherwise.</param>
25+
/// <returns>A boolean indicating whether or not the service was found.</returns>
2526
internal static bool TryGetOrCreateTypeByMetadataName(this Compilation compilation, string fullTypeName, [NotNullWhen(returnValue: true)] out INamedTypeSymbol? namedTypeSymbol)
2627
=> WellKnownTypeProvider.GetOrCreate(compilation).TryGetOrCreateTypeByMetadataName(fullTypeName, out namedTypeSymbol);
2728
}

src/Platform/Microsoft.Testing.Platform/Helpers/TestApplicationBuilderExtensions.cs

+9
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,26 @@
77

88
namespace Microsoft.Testing.Platform.Helpers;
99

10+
/// <summary>
11+
/// A collection of extension methods for <see cref="ITestApplicationBuilder"/>.
12+
/// </summary>
1013
[Experimental("TPEXP", UrlFormat = "https://aka.ms/testingplatform/diagnostics#{0}")]
1114
[SuppressMessage("ApiDesign", "RS0016:Add public types and members to the declared API", Justification = "Experimental API")]
1215
public static class TestApplicationBuilderExtensions
1316
{
17+
/// <summary>
18+
/// Registers the command-line options provider for '--treenode-filter'.
19+
/// </summary>
20+
/// <param name="testApplicationBuilder">The test application builder.</param>
21+
/// <param name="extension">The extension owner of the tree node filter service.</param>
1422
public static void AddTreeNodeFilterService(this ITestApplicationBuilder testApplicationBuilder, IExtension extension)
1523
=> testApplicationBuilder.CommandLine.AddProvider(() => new TreeNodeFilterCommandLineOptionsProvider(extension));
1624

1725
/// <summary>
1826
/// Registers the command-line options provider for '--maximum-failed-tests'.
1927
/// </summary>
2028
/// <param name="builder">The test application builder.</param>
29+
/// <param name="extension">The extension owner of the maximum failed tests service.</param>
2130
[Experimental("TPEXP", UrlFormat = "https://aka.ms/testingplatform/diagnostics#{0}")]
2231
public static void AddMaximumFailedTestsService(this ITestApplicationBuilder builder, IExtension extension)
2332
=> builder.CommandLine.AddProvider(serviceProvider => new MaxFailedTestsCommandLineOptionsProvider(extension, serviceProvider));

src/TestFramework/TestFramework/Assertions/CollectionAssert.cs

+2
Original file line numberDiff line numberDiff line change
@@ -1486,6 +1486,7 @@ internal static bool IsSubsetOfHelper(ICollection subset, ICollection superset)
14861486
/// <param name="collection">
14871487
/// The collection to process.
14881488
/// </param>
1489+
/// <param name="comparer">The equality comparer to use when comparing items.</param>
14891490
/// <param name="nullCount">
14901491
/// The number of null elements in the collection.
14911492
/// </param>
@@ -1531,6 +1532,7 @@ private static Dictionary<T, int> GetElementCounts<T>(IEnumerable<T?> collection
15311532
/// <param name="actual">
15321533
/// The second collection to compare.
15331534
/// </param>
1535+
/// <param name="comparer">The equality comparer to use when comparing items.</param>
15341536
/// <param name="expectedCount">
15351537
/// The expected number of occurrences of
15361538
/// <paramref name="mismatchedElement"/> or 0 if there is no mismatched

src/TestFramework/TestFramework/Attributes/TestMethod/OSConditionAttribute.cs

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ public sealed class OSConditionAttribute : ConditionBaseAttribute
2626
/// <summary>
2727
/// Initializes a new instance of the <see cref="OSConditionAttribute"/> class.
2828
/// </summary>
29+
/// <param name="mode">Decides whether the OSes will be included or excluded.</param>
2930
/// <param name="operatingSystems">The operating systems that this test supports.</param>
3031
public OSConditionAttribute(ConditionMode mode, OperatingSystems operatingSystems)
3132
: base(mode)

test/Utilities/Automation.CLI/CLITestBase.e2e.cs

+3
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ public CLITestBase()
2828
/// </summary>
2929
/// <param name="sources">Collection of test containers.</param>
3030
/// <param name="runSettings">Run settings for execution.</param>
31+
/// <param name="targetFramework">Target framework for the test run.</param>
3132
public void InvokeVsTestForDiscovery(string[] sources, string runSettings = "", string targetFramework = null)
3233
{
3334
ExpandTestSourcePaths(sources, targetFramework);
@@ -44,6 +45,7 @@ public void InvokeVsTestForDiscovery(string[] sources, string runSettings = "",
4445
/// <param name="sources">List of test assemblies.</param>
4546
/// <param name="runSettings">Run settings for execution.</param>
4647
/// <param name="testCaseFilter">Test Case filter for execution.</param>
48+
/// <param name="targetFramework">Target framework for the test run.</param>
4749
public void InvokeVsTestForExecution(string[] sources, string runSettings = "", string testCaseFilter = null, string targetFramework = null)
4850
{
4951
ExpandTestSourcePaths(sources, targetFramework);
@@ -297,6 +299,7 @@ private static string GetTestMethodName(string testFullName)
297299
/// Converts relative paths to absolute.
298300
/// </summary>
299301
/// <param name="paths">An array of file paths, elements may be modified to absolute paths.</param>
302+
/// <param name="targetFramework">Target framework for the test run.</param>
300303
private void ExpandTestSourcePaths(string[] paths, string targetFramework = null)
301304
{
302305
for (int i = 0; i < paths.Length; i++)

0 commit comments

Comments
 (0)