Skip to content

Commit

Permalink
Misc code cleanup (#4728)
Browse files Browse the repository at this point in the history
  • Loading branch information
Youssef1313 authored Jan 20, 2025
1 parent 288d804 commit 8cec650
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 54 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,6 @@ internal class TestMethodValidator
private readonly ReflectHelper _reflectHelper;
private readonly bool _discoverInternals;

/// <summary>
/// Initializes a new instance of the <see cref="TestMethodValidator"/> class.
/// </summary>
/// <param name="reflectHelper">An instance to reflection helper for type information.</param>
internal TestMethodValidator(ReflectHelper reflectHelper)
: this(reflectHelper, false)
{
}

/// <summary>
/// Initializes a new instance of the <see cref="TestMethodValidator"/> class.
/// </summary>
Expand Down
31 changes: 0 additions & 31 deletions src/Adapter/MSTest.TestAdapter/Execution/RunCleanupResult.cs

This file was deleted.

15 changes: 4 additions & 11 deletions src/Adapter/MSTest.TestAdapter/Helpers/RunSettingsUtilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,11 @@ internal static class RunSettingsUtilities
/// <summary>
/// Gets the settings to be used while creating XmlReader for runsettings.
/// </summary>
internal static XmlReaderSettings ReaderSettings
internal static XmlReaderSettings ReaderSettings { get; } = new XmlReaderSettings
{
get
{
var settings = new XmlReaderSettings
{
IgnoreComments = true,
IgnoreWhitespace = true,
};
return settings;
}
}
IgnoreComments = true,
IgnoreWhitespace = true,
};

/// <summary>
/// Gets the set of user defined test run parameters from settings xml as key value pairs.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ internal TestableAssemblyEnumerator()
{
var reflectHelper = new Mock<ReflectHelper>();
var typeValidator = new Mock<TypeValidator>(reflectHelper.Object);
var testMethodValidator = new Mock<TestMethodValidator>(reflectHelper.Object);
var testMethodValidator = new Mock<TestMethodValidator>(reflectHelper.Object, false);
MockTypeEnumerator = new Mock<TypeEnumerator>(
typeof(DummyTestClass),
"DummyAssembly",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class TestMethodValidatorTests : TestContainer
public TestMethodValidatorTests()
{
_mockReflectHelper = new Mock<ReflectHelper>();
_testMethodValidator = new TestMethodValidator(_mockReflectHelper.Object);
_testMethodValidator = new TestMethodValidator(_mockReflectHelper.Object, discoverInternals: false);
_warnings = [];

_mockMethodInfo = new Mock<MethodInfo>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public TypeEnumeratorTests()
};

_mockTypeValidator = new Mock<TypeValidator>(MockBehavior.Default, _mockReflectHelper.Object);
_mockTestMethodValidator = new Mock<TestMethodValidator>(MockBehavior.Default, _mockReflectHelper.Object);
_mockTestMethodValidator = new Mock<TestMethodValidator>(MockBehavior.Default, _mockReflectHelper.Object, false);
_warnings = new List<string>();
_mockMessageLogger = new Mock<IMessageLogger>();

Expand Down

0 comments on commit 8cec650

Please sign in to comment.