Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spelling #4526

Merged
merged 4 commits into from
Jun 6, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -537,8 +537,8 @@ private void SessionEndedHandler(object? sender, SessionEndEventArgs args)
{
try
{
var fileTranferInformation = new FileTransferInformation(_context.SessionDataCollectionContext, dumpFile, true);
_dataCollectionSink.SendFileAsync(fileTranferInformation);
var fileTransferInformation = new FileTransferInformation(_context.SessionDataCollectionContext, dumpFile, true);
_dataCollectionSink.SendFileAsync(fileTransferInformation);
}
catch (FileNotFoundException ex)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public void OnEventLogEntryWrittenShouldNotAddLogsIfNoNewEntryIsPresent()

[TestMethod]
[Ignore] // "TODO: gets stuck"
public void OnEventLogEntryWrittenShoulFilterLogsBasedOnEventTypeAndEventSource()
public void OnEventLogEntryWrittenShouldFilterLogsBasedOnEventTypeAndEventSource()
{
_entryTypes.Add(EventLogEntryType.Warning);
_eventSources.Add("Application");
Expand All @@ -87,7 +87,7 @@ public void OnEventLogEntryWrittenShoulFilterLogsBasedOnEventTypeAndEventSource(
}

[TestMethod]
public void OnEventLogEntryWrittenShoulNotAddLogsIfEventSourceIsDifferent()
public void OnEventLogEntryWrittenShouldNotAddLogsIfEventSourceIsDifferent()
{
_eventSources.Clear();
_eventSources.Add("Application1");
Expand All @@ -106,7 +106,7 @@ public void OnEventLogEntryWrittenShoulNotAddLogsIfEventSourceIsDifferent()
}

[TestMethod]
public void OnEventLogEntryWrittenShoulNotAddLogsIfEventTypeIsDifferent()
public void OnEventLogEntryWrittenShouldNotAddLogsIfEventTypeIsDifferent()
{
_entryTypes.Clear();
_entryTypes.Add(EventLogEntryType.FailureAudit);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,15 +110,15 @@ public void ShouldSurroundWithQuotesShouldReturnTrueIfItIsNotSurroundWithQuotesA
}

[TestMethod]
public void IsSurroundedWithQuotesShouldReturnTrueIfStringIsSurrondedByQuotes()
public void IsSurroundedWithQuotesShouldReturnTrueIfStringIsSurroundedByQuotes()
{
string stringSurroundWithQuotes = "\"some string\"";

Assert.IsTrue(ArgumentEscaper.IsSurroundedWithQuotes(stringSurroundWithQuotes));
}

[TestMethod]
public void IsSurroundedWithQuotesShouldReturnFalseIfStringIsNotSurrondedByQuotes()
public void IsSurroundedWithQuotesShouldReturnFalseIfStringIsNotSurroundedByQuotes()
{
string stringNotSurroundWithQuotes = "some string";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public void DesignModeClientInitializeShouldInstantiateClassAndCreateClient()
}

[TestMethod]
public void TestRunMessageHandlerShouldCallCommmunicationManagerIfMessageisError()
public void TestRunMessageHandlerShouldCallCommunicationManagerIfMessageIsError()
{
_mockCommunicationManager.Setup(cm => cm.SendMessage(It.IsAny<string>()));

Expand All @@ -78,7 +78,7 @@ public void TestRunMessageHandlerShouldCallCommmunicationManagerIfMessageisError
}

[TestMethod]
public void TestRunMessageHandlerShouldCallCommmunicationManagerIfMessageisWarning()
public void TestRunMessageHandlerShouldCallCommunicationManagerIfMessageIsWarning()
{
_mockCommunicationManager.Setup(cm => cm.SendMessage(It.IsAny<string>()));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -484,18 +484,18 @@ public void HandleTestRunCompleteShouldCollectMetrics()
_mockRequestData.Setup(rd => rd.MetricsCollection).Returns(mockMetricsCollector.Object);

_testRunRequest.ExecuteAsync();
var testRunCompeleteEventsArgs = new TestRunCompleteEventArgs(
var testRunCompleteEventsArgs = new TestRunCompleteEventArgs(
new TestRunStatistics(1, null),
false,
false,
null,
null,
null,
TimeSpan.FromSeconds(0));
testRunCompeleteEventsArgs.Metrics = dict;
testRunCompleteEventsArgs.Metrics = dict;

// Act
_testRunRequest.HandleTestRunComplete(testRunCompeleteEventsArgs, null, null, null);
_testRunRequest.HandleTestRunComplete(testRunCompleteEventsArgs, null, null, null);

// Verify.
mockMetricsCollector.Verify(rd => rd.Add(TelemetryDataConstants.TimeTakenInSecForRun, It.IsAny<double>()), Times.Once);
Expand All @@ -511,7 +511,7 @@ public void HandleTestRunCompleteShouldHandleListAttachments()
List<AttachmentSet> attachmentSets = new() { new AttachmentSet(new Uri("datacollector://attachment"), "datacollectorAttachment") };

_testRunRequest.ExecuteAsync();
var testRunCompeleteEventsArgs = new TestRunCompleteEventArgs(
var testRunCompleteEventsArgs = new TestRunCompleteEventArgs(
new TestRunStatistics(1, null),
false,
false,
Expand All @@ -521,7 +521,7 @@ public void HandleTestRunCompleteShouldHandleListAttachments()
TimeSpan.FromSeconds(0));

// Act
_testRunRequest.HandleTestRunComplete(testRunCompeleteEventsArgs, null, attachmentSets, null);
_testRunRequest.HandleTestRunComplete(testRunCompleteEventsArgs, null, attachmentSets, null);

// Verify.
Assert.IsTrue(attachmentsFound);
Expand All @@ -536,7 +536,7 @@ public void HandleTestRunCompleteShouldHandleCollectionAttachments()
Collection<AttachmentSet> attachmentSets = new(new List<AttachmentSet> { new AttachmentSet(new Uri("datacollector://attachment"), "datacollectorAttachment") });

_testRunRequest.ExecuteAsync();
var testRunCompeleteEventsArgs = new TestRunCompleteEventArgs(
var testRunCompleteEventsArgs = new TestRunCompleteEventArgs(
new TestRunStatistics(1, null),
false,
false,
Expand All @@ -546,7 +546,7 @@ public void HandleTestRunCompleteShouldHandleCollectionAttachments()
TimeSpan.FromSeconds(0));

// Act
_testRunRequest.HandleTestRunComplete(testRunCompeleteEventsArgs, null, attachmentSets, null);
_testRunRequest.HandleTestRunComplete(testRunCompleteEventsArgs, null, attachmentSets, null);

// Verify.
Assert.IsTrue(attachmentsFound);
Expand All @@ -559,7 +559,7 @@ public void HandleTestRunCompleteShouldHandleEmptyAttachments()
_testRunRequest.OnRunCompletion += (s, e) => attachmentsFound = (e.AttachmentSets.Count == 0);

_testRunRequest.ExecuteAsync();
var testRunCompeleteEventsArgs = new TestRunCompleteEventArgs(
var testRunCompleteEventsArgs = new TestRunCompleteEventArgs(
new TestRunStatistics(1, null),
false,
false,
Expand All @@ -569,7 +569,7 @@ public void HandleTestRunCompleteShouldHandleEmptyAttachments()
TimeSpan.FromSeconds(0));

// Act
_testRunRequest.HandleTestRunComplete(testRunCompeleteEventsArgs, null, null, null);
_testRunRequest.HandleTestRunComplete(testRunCompleteEventsArgs, null, null, null);

// Verify.
Assert.IsTrue(attachmentsFound);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,7 @@ public void CleanUp()
private static XmlElement GetDumpConfigurationElement(
bool isFullDump = false,
bool collectDumpOnExit = false,
bool colectDumpOnHang = false,
bool collectDumpOnHang = false,
SimonCropp marked this conversation as resolved.
Show resolved Hide resolved
int inactivityTimeInMilliseconds = 0)
{
var xmldoc = new XmlDocument();
Expand All @@ -721,7 +721,7 @@ public void CleanUp()
node.Attributes.Append(collectDumpOnExitAttribute);
}

if (colectDumpOnHang)
if (collectDumpOnHang)
{
var hangDumpNode = xmldoc.CreateElement(Constants.CollectDumpOnTestSessionHang);
outernode.AppendChild(hangDumpNode);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ public void GetTestPlatformExtensionsShouldReturnEmptySetIfSourceDirectoryDoesNo
}

[TestMethod]
public void GetTestPlatformExtensionsShouldReturnLibariesFromSourceDirectory()
public void GetTestPlatformExtensionsShouldReturnLibrariesFromSourceDirectory()
{
_mockFileHelper.Setup(fh => fh.DirectoryExists(It.IsAny<string>())).Returns(true);
_mockFileHelper.Setup(fh => fh.EnumerateFiles(It.IsAny<string>(), SearchOption.TopDirectoryOnly, It.IsAny<string[]>())).Returns(new[] { "foo.TestAdapter.dll" });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1558,14 +1558,14 @@ public void StartTestRunWithSelectedTestsHavingTraitsShouldReturnTestRunStatsWit
null);
var testsRunStatsPayload = CreateMessage(MessageType.TestRunStatsChange, testsChangedArgs);

var testRunCompletepayload = new TestRunCompletePayload()
var testRunCompletePayload = new TestRunCompletePayload
{
ExecutorUris = null,
LastRunTests = dummyLastRunArgs,
RunAttachments = null,
TestRunCompleteArgs = dummyCompleteArgs
};
var runComplete = CreateMessage(MessageType.ExecutionComplete, testRunCompletepayload);
var runComplete = CreateMessage(MessageType.ExecutionComplete, testRunCompletePayload);

_mockCommunicationManager.Setup(cm => cm.ReceiveMessageAsync(It.IsAny<CancellationToken>())).Returns(Task.FromResult<Message?>(testsRunStatsPayload));

Expand Down Expand Up @@ -1615,14 +1615,14 @@ public async Task StartTestRunAsyncWithSelectedTestsHavingTraitsShouldReturnTest
null);
var testsRunStatsPayload = CreateMessage(MessageType.TestRunStatsChange, testsChangedArgs);

var testRunCompletepayload = new TestRunCompletePayload()
var testRunCompletePayload = new TestRunCompletePayload()
{
ExecutorUris = null,
LastRunTests = dummyLastRunArgs,
RunAttachments = null,
TestRunCompleteArgs = dummyCompleteArgs
};
var runComplete = CreateMessage(MessageType.ExecutionComplete, testRunCompletepayload);
var runComplete = CreateMessage(MessageType.ExecutionComplete, testRunCompletePayload);

_mockCommunicationManager.Setup(cm => cm.ReceiveMessageAsync(It.IsAny<CancellationToken>())).Returns(Task.FromResult<Message?>(testsRunStatsPayload));

Expand Down Expand Up @@ -1776,14 +1776,14 @@ public void StartTestRunWithCustomHostInParallelShouldCallCustomHostMultipleTime
var message1 = CreateMessage(MessageType.CustomTestHostLaunch, p1);
var message2 = CreateMessage(MessageType.CustomTestHostLaunch, p2);
var dummyCompleteArgs = new TestRunCompleteEventArgs(null, false, false, null, null, null, TimeSpan.FromMilliseconds(1));
var completepayload = new TestRunCompletePayload()
var completePayload = new TestRunCompletePayload()
{
ExecutorUris = null,
LastRunTests = null,
RunAttachments = null,
TestRunCompleteArgs = dummyCompleteArgs
};
var runComplete = CreateMessage(MessageType.ExecutionComplete, completepayload);
var runComplete = CreateMessage(MessageType.ExecutionComplete, completePayload);

_mockCommunicationManager.Setup(cm => cm.ReceiveMessageAsync(It.IsAny<CancellationToken>())).Returns(Task.FromResult<Message?>(message1));
mockLauncher.Setup(ml => ml.LaunchTestHost(It.IsAny<TestProcessStartInfo>()))
Expand Down Expand Up @@ -1815,14 +1815,14 @@ public async Task StartTestRunWithCustomHostAsyncInParallelShouldCallCustomHostM
var message1 = CreateMessage(MessageType.CustomTestHostLaunch, p1);
var message2 = CreateMessage(MessageType.CustomTestHostLaunch, p2);
var dummyCompleteArgs = new TestRunCompleteEventArgs(null, false, false, null, null, null, TimeSpan.FromMilliseconds(1));
var completepayload = new TestRunCompletePayload()
var completePayload = new TestRunCompletePayload()
{
ExecutorUris = null,
LastRunTests = null,
RunAttachments = null,
TestRunCompleteArgs = dummyCompleteArgs
};
var runComplete = CreateMessage(MessageType.ExecutionComplete, completepayload);
var runComplete = CreateMessage(MessageType.ExecutionComplete, completePayload);

_mockCommunicationManager.Setup(cm => cm.ReceiveMessageAsync(It.IsAny<CancellationToken>())).Returns(Task.FromResult<Message?>(message1));
mockLauncher.Setup(ml => ml.LaunchTestHost(It.IsAny<TestProcessStartInfo>()))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public CommunicationLayerIntegrationTests()
}

[TestMethod]
public void BeforeTestRunStartShouldGetEnviornmentVariables()
public void BeforeTestRunStartShouldGetEnvironmentVariables()
{
var dataCollectionRequestSender = new DataCollectionRequestSender();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ public void AddAttachmentShouldNotAddNewFileTransferIfNullIsPassed()
}

[TestMethod]
public void GetAttachmentsShouldReturnAllAttachmets()
public void GetAttachmentsShouldReturnAllAttachments()
{
var filename = "filename1.txt";
File.WriteAllText(Path.Combine(TempDirectoryPath, filename), string.Empty);
Expand All @@ -293,7 +293,7 @@ public void GetAttachmentsShouldReturnAllAttachmets()
}

[TestMethod]
public void GetAttachmentsShouldNotReutrnAnyDataWhenActiveFileTransferAreNotPresent()
public void GetAttachmentsShouldNotReturnAnyDataWhenActiveFileTransferAreNotPresent()
{
_attachmentManager.Initialize(_sessionId, TempDirectoryPath, _messageSink.Object);

Expand Down
4 changes: 2 additions & 2 deletions test/datacollector.UnitTests/DataCollectionManagerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ public void SessionStartedShouldReturnTrueIfTestCaseStartIsSubscribed()
}

[TestMethod]
public void SessionStaretedShouldContinueDataCollectionIfExceptionIsThrownWhileSendingEventsToDataCollector()
public void SessionStartedShouldContinueDataCollectionIfExceptionIsThrownWhileSendingEventsToDataCollector()
{
SetupMockDataCollector((XmlElement a, DataCollectionEvents b, DataCollectionSink c, DataCollectionLogger d, DataCollectionEnvironmentContext e) => b.SessionStart += (sender, eventArgs) => throw new Exception());

Expand Down Expand Up @@ -454,7 +454,7 @@ public void TestCaseEndedShouldSendEventToDataCollector()
}

[TestMethod]
public void TestCaseEndedShouldNotSendEventToDataCollectorIfDataColletionIsNotEnbled()
public void TestCaseEndedShouldNotSendEventToDataCollectorIfDataCollectionIsNotEnbled()
{
var isEndInvoked = false;
var runSettings = string.Format(CultureInfo.InvariantCulture, _defaultRunSettings, _dataCollectorSettings);
Expand Down
6 changes: 3 additions & 3 deletions test/datacollector.UnitTests/DataCollectorMainTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class DataCollectorMainTests
private readonly string[] _argsWithEmptyDiagArg = { "--port", "1025", "--parentprocessid", "100", "--diag", "", "--tracelevel", "3" };
private readonly string[] _argsWithInvalidTraceLevel = { "--port", "1025", "--parentprocessid", "100", "--diag", "abc.txt", "--tracelevel", "5" };

private static readonly string TimoutErrorMessage =
private static readonly string TimeoutErrorMessage =
"datacollector process failed to connect to vstest.console process after 90 seconds. This may occur due to machine slowness, please set environment variable VSTEST_CONNECTION_TIMEOUT to increase timeout.";
private readonly Mock<IProcessHelper> _mockProcessHelper;
private readonly Mock<IEnvironment> _mockEnvironment;
Expand Down Expand Up @@ -55,7 +55,7 @@ public void RunShouldTimeoutBasedOnEnvVariable()
}

[TestMethod]
public void RunShouldTimeoutBasedDefaulValueIfEnvVariableNotSet()
public void RunShouldTimeoutBasedDefaultValueIfEnvVariableNotSet()
{
_dataCollectorMain.Run(_args);

Expand Down Expand Up @@ -115,7 +115,7 @@ public void RunShouldThrowIfTimeoutOccured()
{
_mockDataCollectionRequestHandler.Setup(rh => rh.WaitForRequestSenderConnection(It.IsAny<int>())).Returns(false);
var message = Assert.ThrowsException<TestPlatformException>(() => _dataCollectorMain.Run(_args)).Message;
Assert.AreEqual(TimoutErrorMessage, message);
Assert.AreEqual(TimeoutErrorMessage, message);
}

[TestMethod]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public void RaiseEventsShouldRaiseEventsIfSessionStartEventArgsIsPassed()
}

[TestMethod]
public void RaiseEventsShouldNotRaiseEventsIfEventIsNotRegisterd()
public void RaiseEventsShouldNotRaiseEventsIfEventIsNotRegistered()
{
_isEventRaised = false;
var testCase = new TestCase();
Expand All @@ -57,7 +57,7 @@ public void RaiseEventsShouldNotRaiseEventsIfEventIsNotRegisterd()
}

[TestMethod]
public void RaiseEventsShouldNotRaiseEventsIfEventIsUnRegisterd()
public void RaiseEventsShouldNotRaiseEventsIfEventIsUnRegistered()
{
_isEventRaised = false;
var testCase = new TestCase();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public void AutoDetectArchitectureShouldReturnDefaultArchOnConflictArches()
}

[TestMethod]
public void AutoDetectArchitectureShouldPoulateSourceArchitectureDictionary()
public void AutoDetectArchitectureShouldPopulateSourceArchitectureDictionary()
{
_mockAssemblyHelper.SetupSequence(ah => ah.GetArchitecture(It.IsAny<string>()))
.Returns(Architecture.AnyCPU).Returns(Architecture.X64).Returns(Architecture.X86);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ public void TestResultHandlerShouldShowFailedTestsAndPassedTestsForQuietVerbosit
[TestMethod]
[DataRow("normal")]
[DataRow("detailed")]
public void TestResultHandlerShouldNotShowformattedFailedTestsAndPassedTestsForOtherThanQuietVebosity(string verbosityLevel)
public void TestResultHandlerShouldNotShowformattedFailedTestsAndPassedTestsForOtherThanQuietVerbosity(string verbosityLevel)
{
var loggerEvents = new InternalTestLoggerEvents(TestSessionMessageLogger.Instance);
loggerEvents.EnableEvents();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public void CapabilitiesShouldReturnAppropriateProperties()
#region CollectArgumentExecutor tests

[TestMethod]
public void InitializeShouldThrowIfArguemntIsNull()
public void InitializeShouldThrowIfArgumentIsNull()
{
Assert.ThrowsException<CommandLineException>(() => _executor.Initialize(null));
}
Expand Down Expand Up @@ -291,7 +291,7 @@ public void InitializeShouldAddOutProcAndInprocCollectorWhenXPlatCodeCoverageIsE
}

[TestMethod]
public void UpdageXPlatCodeCoverageCodebaseWithFullPathFromTestAdaptersPaths_Found()
public void UpdateXPlatCodeCoverageCodebaseWithFullPathFromTestAdaptersPaths_Found()
{
var runsettingsString = string.Format(CultureInfo.CurrentCulture, _defaultRunSettings, string.Empty);
var runsettings = new RunSettings();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public void InIsolationValueShouldBeOverriden()
}

[TestMethod]
public void ShoudWarnWhenAValueIsOverriden()
public void ShouldWarnWhenAValueIsOverriden()
{
// Arrange
_settingsProvider.UpdateRunSettingsNode("RunConfiguration.EnvironmentVariables.VARIABLE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ public void InitializeShouldPreserveActualJapaneseString()
}

[TestMethod]
public void InitializeShouldSetInIsolataionToTrueIfEnvironmentVariablesSpecified()
public void InitializeShouldSetInIsolationToTrueIfEnvironmentVariablesSpecified()
{
var settingsXml = @"<RunSettings><RunConfiguration><EnvironmentVariables><RANDOM_PATH>C:\temp</RANDOM_PATH></EnvironmentVariables></RunConfiguration></RunSettings>";

Expand All @@ -354,7 +354,7 @@ public void InitializeShouldSetInIsolataionToTrueIfEnvironmentVariablesSpecified
}

[TestMethod]
public void InitializeShouldNotSetInIsolataionToTrueIfEnvironmentVariablesNotSpecified()
public void InitializeShouldNotSetInIsolationToTrueIfEnvironmentVariablesNotSpecified()
{
var settingsXml = @"<RunSettings><RunConfiguration></RunConfiguration></RunSettings>";

Expand Down