Skip to content

Commit bf1f427

Browse files
EvangelinkHaplois
andauthored
Run dotnet format whitespace (#1085)
* Run dotnet format whitespace Co-authored-by: Medeni Baykal <433724+Haplois@users.noreply.github.com>
1 parent 9437f21 commit bf1f427

File tree

27 files changed

+167
-167
lines changed

27 files changed

+167
-167
lines changed

src/Adapter/PlatformServices.Desktop.Legacy/Data/CsvDataConnection.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public override List<string> GetColumns(string tableName)
7070
}
7171
catch (Exception exception)
7272
{
73-
EqtTrace.ErrorIf(EqtTrace.IsErrorEnabled, exception.Message + " for CSV data source " + this.fileName);
73+
EqtTrace.ErrorIf(EqtTrace.IsErrorEnabled, exception.Message + " for CSV data source " + this.fileName);
7474
}
7575

7676
return null;

src/Adapter/PlatformServices.Desktop.Legacy/Services/DesktopTestSourceHost.cs

Lines changed: 48 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -283,65 +283,65 @@ internal virtual List<string> GetResolutionPaths(string sourceFileName, bool isP
283283
return resolutionPaths;
284284
}
285285

286-
internal virtual string GetTargetFrameworkVersionString(string sourceFileName)
287-
{
288-
return AppDomainUtilities.GetTargetFrameworkVersionString(sourceFileName);
289-
}
290-
291-
private string GetConfigFileForTestSource(string sourceFileName)
292-
{
293-
return new DeploymentUtility().GetConfigFile(sourceFileName);
294-
}
295-
296-
/// <summary>
297-
/// Sets context required for running tests.
298-
/// </summary>
299-
/// <param name="source">
300-
/// source parameter used for setting context
301-
/// </param>
302-
private void SetContext(string source)
303-
{
304-
if (string.IsNullOrEmpty(source))
286+
internal virtual string GetTargetFrameworkVersionString(string sourceFileName)
305287
{
306-
return;
288+
return AppDomainUtilities.GetTargetFrameworkVersionString(sourceFileName);
307289
}
308290

309-
Exception setWorkingDirectoryException = null;
310-
this.currentDirectory = Environment.CurrentDirectory;
311-
312-
try
313-
{
314-
Environment.CurrentDirectory = Path.GetDirectoryName(source);
315-
EqtTrace.Info("MSTestExecutor: Changed the working directory to {0}", Environment.CurrentDirectory);
316-
}
317-
catch (IOException ex)
318-
{
319-
setWorkingDirectoryException = ex;
320-
}
321-
catch (System.Security.SecurityException ex)
291+
private string GetConfigFileForTestSource(string sourceFileName)
322292
{
323-
setWorkingDirectoryException = ex;
293+
return new DeploymentUtility().GetConfigFile(sourceFileName);
324294
}
325295

326-
if (setWorkingDirectoryException != null)
296+
/// <summary>
297+
/// Sets context required for running tests.
298+
/// </summary>
299+
/// <param name="source">
300+
/// source parameter used for setting context
301+
/// </param>
302+
private void SetContext(string source)
327303
{
328-
EqtTrace.Error("MSTestExecutor.SetWorkingDirectory: Failed to set the working directory to '{0}'. {1}", Path.GetDirectoryName(source), setWorkingDirectoryException);
304+
if (string.IsNullOrEmpty(source))
305+
{
306+
return;
307+
}
308+
309+
Exception setWorkingDirectoryException = null;
310+
this.currentDirectory = Environment.CurrentDirectory;
311+
312+
try
313+
{
314+
Environment.CurrentDirectory = Path.GetDirectoryName(source);
315+
EqtTrace.Info("MSTestExecutor: Changed the working directory to {0}", Environment.CurrentDirectory);
316+
}
317+
catch (IOException ex)
318+
{
319+
setWorkingDirectoryException = ex;
320+
}
321+
catch (System.Security.SecurityException ex)
322+
{
323+
setWorkingDirectoryException = ex;
324+
}
325+
326+
if (setWorkingDirectoryException != null)
327+
{
328+
EqtTrace.Error("MSTestExecutor.SetWorkingDirectory: Failed to set the working directory to '{0}'. {1}", Path.GetDirectoryName(source), setWorkingDirectoryException);
329+
}
329330
}
330-
}
331331

332-
/// <summary>
333-
/// Resets the context as it was before calling SetContext()
334-
/// </summary>
335-
private void ResetContext()
336-
{
337-
if (!string.IsNullOrEmpty(this.currentDirectory))
332+
/// <summary>
333+
/// Resets the context as it was before calling SetContext()
334+
/// </summary>
335+
private void ResetContext()
338336
{
339-
Environment.CurrentDirectory = this.currentDirectory;
337+
if (!string.IsNullOrEmpty(this.currentDirectory))
338+
{
339+
Environment.CurrentDirectory = this.currentDirectory;
340+
}
340341
}
341-
}
342342

343-
private void AddSearchDirectoriesSpecifiedInRunSettingsToAssemblyResolver(AssemblyResolver assemblyResolver, string baseDirectory)
344-
{
343+
private void AddSearchDirectoriesSpecifiedInRunSettingsToAssemblyResolver(AssemblyResolver assemblyResolver, string baseDirectory)
344+
{
345345
// Check if user specified any adapter settings
346346
MSTestAdapterSettings adapterSettings = MSTestSettingsProvider.Settings;
347347

@@ -364,7 +364,7 @@ private void AddSearchDirectoriesSpecifiedInRunSettingsToAssemblyResolver(Assemb
364364
}
365365
}
366366
}
367-
}
367+
}
368368

369369
#pragma warning restore SA1649 // SA1649FileNameMustMatchTypeName
370370
}

src/Adapter/PlatformServices.Desktop/Data/CsvDataConnection.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public override List<string> GetColumns(string tableName)
7070
}
7171
catch (Exception exception)
7272
{
73-
EqtTrace.ErrorIf(EqtTrace.IsErrorEnabled, exception.Message + " for CSV data source " + this.fileName);
73+
EqtTrace.ErrorIf(EqtTrace.IsErrorEnabled, exception.Message + " for CSV data source " + this.fileName);
7474
}
7575

7676
return null;

src/Adapter/PlatformServices.Desktop/Services/DesktopTestSourceHost.cs

Lines changed: 48 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -283,65 +283,65 @@ internal virtual List<string> GetResolutionPaths(string sourceFileName, bool isP
283283
return resolutionPaths;
284284
}
285285

286-
internal virtual string GetTargetFrameworkVersionString(string sourceFileName)
287-
{
288-
return AppDomainUtilities.GetTargetFrameworkVersionString(sourceFileName);
289-
}
290-
291-
private string GetConfigFileForTestSource(string sourceFileName)
292-
{
293-
return new DeploymentUtility().GetConfigFile(sourceFileName);
294-
}
295-
296-
/// <summary>
297-
/// Sets context required for running tests.
298-
/// </summary>
299-
/// <param name="source">
300-
/// source parameter used for setting context
301-
/// </param>
302-
private void SetContext(string source)
303-
{
304-
if (string.IsNullOrEmpty(source))
286+
internal virtual string GetTargetFrameworkVersionString(string sourceFileName)
305287
{
306-
return;
288+
return AppDomainUtilities.GetTargetFrameworkVersionString(sourceFileName);
307289
}
308290

309-
Exception setWorkingDirectoryException = null;
310-
this.currentDirectory = Environment.CurrentDirectory;
311-
312-
try
313-
{
314-
Environment.CurrentDirectory = Path.GetDirectoryName(source);
315-
EqtTrace.Info("MSTestExecutor: Changed the working directory to {0}", Environment.CurrentDirectory);
316-
}
317-
catch (IOException ex)
318-
{
319-
setWorkingDirectoryException = ex;
320-
}
321-
catch (System.Security.SecurityException ex)
291+
private string GetConfigFileForTestSource(string sourceFileName)
322292
{
323-
setWorkingDirectoryException = ex;
293+
return new DeploymentUtility().GetConfigFile(sourceFileName);
324294
}
325295

326-
if (setWorkingDirectoryException != null)
296+
/// <summary>
297+
/// Sets context required for running tests.
298+
/// </summary>
299+
/// <param name="source">
300+
/// source parameter used for setting context
301+
/// </param>
302+
private void SetContext(string source)
327303
{
328-
EqtTrace.Error("MSTestExecutor.SetWorkingDirectory: Failed to set the working directory to '{0}'. {1}", Path.GetDirectoryName(source), setWorkingDirectoryException);
304+
if (string.IsNullOrEmpty(source))
305+
{
306+
return;
307+
}
308+
309+
Exception setWorkingDirectoryException = null;
310+
this.currentDirectory = Environment.CurrentDirectory;
311+
312+
try
313+
{
314+
Environment.CurrentDirectory = Path.GetDirectoryName(source);
315+
EqtTrace.Info("MSTestExecutor: Changed the working directory to {0}", Environment.CurrentDirectory);
316+
}
317+
catch (IOException ex)
318+
{
319+
setWorkingDirectoryException = ex;
320+
}
321+
catch (System.Security.SecurityException ex)
322+
{
323+
setWorkingDirectoryException = ex;
324+
}
325+
326+
if (setWorkingDirectoryException != null)
327+
{
328+
EqtTrace.Error("MSTestExecutor.SetWorkingDirectory: Failed to set the working directory to '{0}'. {1}", Path.GetDirectoryName(source), setWorkingDirectoryException);
329+
}
329330
}
330-
}
331331

332-
/// <summary>
333-
/// Resets the context as it was before calling SetContext()
334-
/// </summary>
335-
private void ResetContext()
336-
{
337-
if (!string.IsNullOrEmpty(this.currentDirectory))
332+
/// <summary>
333+
/// Resets the context as it was before calling SetContext()
334+
/// </summary>
335+
private void ResetContext()
338336
{
339-
Environment.CurrentDirectory = this.currentDirectory;
337+
if (!string.IsNullOrEmpty(this.currentDirectory))
338+
{
339+
Environment.CurrentDirectory = this.currentDirectory;
340+
}
340341
}
341-
}
342342

343-
private void AddSearchDirectoriesSpecifiedInRunSettingsToAssemblyResolver(AssemblyResolver assemblyResolver, string baseDirectory)
344-
{
343+
private void AddSearchDirectoriesSpecifiedInRunSettingsToAssemblyResolver(AssemblyResolver assemblyResolver, string baseDirectory)
344+
{
345345
// Check if user specified any adapter settings
346346
MSTestAdapterSettings adapterSettings = MSTestSettingsProvider.Settings;
347347

@@ -364,7 +364,7 @@ private void AddSearchDirectoriesSpecifiedInRunSettingsToAssemblyResolver(Assemb
364364
}
365365
}
366366
}
367-
}
367+
}
368368

369369
#pragma warning restore SA1649 // SA1649FileNameMustMatchTypeName
370370
}

src/Adapter/PlatformServices.NetCore/Services/NetCoreTestContextImplementation.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ public string GetDiagnosticMessages()
402402
/// </summary>
403403
public void ClearDiagnosticMessages()
404404
{
405-
this.threadSafeStringWriter.ToStringAndClear();
405+
this.threadSafeStringWriter.ToStringAndClear();
406406
}
407407

408408
public void SetDataRow(object dataRow)

src/Adapter/PlatformServices.Shared/netstandard1.0/Services/ns10FileOperations.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ public Assembly LoadAssembly(string assemblyName, bool isReflectionOnly)
3636
/// <returns>Path to the .DLL of the assembly.</returns>
3737
public string GetAssemblyPath(Assembly assembly)
3838
{
39-
#if NETSTANDARD1_5
40-
return assembly.Location;
41-
#else
39+
#if NETSTANDARD1_5
40+
return assembly.Location;
41+
#else
4242
return null;
43-
#endif
43+
#endif
4444
}
4545

4646
/// <summary>

src/Adapter/PlatformServices.Shared/netstandard1.0/Utilities/ns10Validate.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ namespace Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Uti
55
{
66
using System;
77

8-
#pragma warning disable SA1649 // File name must match first type name
8+
#pragma warning disable SA1649 // File name must match first type name
99

1010
internal class Validate
1111
{

src/Adapter/PlatformServices.Shared/netstandard1.3/Services/ns13ThreadSafeStringWriter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ protected override void Dispose(bool disposing)
120120
ThreadSafeStringWriter.State?.Value?.Remove(this.outputType);
121121
try
122122
{
123-
base.Dispose(disposing);
123+
base.Dispose(disposing);
124124
}
125125
catch (ObjectDisposedException)
126126
{

src/TestFramework/Extension.Desktop/ConfigurationSettings/DataSourceElementCollection.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace Microsoft.VisualStudio.TestTools.UnitTesting
1010
/// <summary>
1111
/// The Data source element collection.
1212
/// </summary>
13-
[SuppressMessage("Microsoft.Design", "CA1010:CollectionsShouldImplementGenericInterface", Justification ="Compat")]
13+
[SuppressMessage("Microsoft.Design", "CA1010:CollectionsShouldImplementGenericInterface", Justification = "Compat")]
1414
public sealed class DataSourceElementCollection : ConfigurationElementCollection
1515
{
1616
/// <summary>

test/ComponentTests/TestAssets/TestProjectForAssemblyResolution/UnitTest1.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ namespace PlatformServices.Desktop.ComponentTests
66
[TestClass]
77
[Serializable]
88
public class TestProjectForAssemblyResolution : MarshalByRefObject
9-
{
9+
{
1010
[TestMethod]
1111
public void TestMethod1()
1212
{

0 commit comments

Comments
 (0)