Skip to content

Commit

Permalink
New version
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubch1 committed May 21, 2020
1 parent 1cae4c5 commit 04aac62
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

namespace Microsoft.VisualStudio.TestPlatform.ObjectModel.Engine.TesthostProtocol
{
using Microsoft.VisualStudio.TestPlatform.ObjectModel.Client;
using System.Collections.Generic;

namespace Microsoft.VisualStudio.TestPlatform.Common.Interfaces.Engine.TesthostProtocol
{
/// <summary>
/// Orchestrates multi test runs finalization operations for the engine communicating with the test host process.
/// </summary>
public interface IMultiTestRunsFinalizationManager
{
/// <summary>
/// Discovers tests
/// </summary>
/// <param name="discoveryCriteria">Settings, parameters for the discovery request</param>
/// <param name="eventHandler">EventHandler for handling discovery events from Engine</param>
void FinalizeMultiTestRuns(IEnumerable<AttachmentSet> attachments, IMultiTestRunsFinalizationEventsHandler eventHandler);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.MultiTestRunsFinalization
{
class MultiTestRunsFinalizationManager
{
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Microsoft.VisualStudio.TestPlatform.ObjectModel.Client
/// <summary>
/// Interface contract for handling multi test runs finalization complete events
/// </summary>
public interface IMultiTestRunsFinalizationCompleteEventsHandler : ITestMessageEventHandler
public interface IMultiTestRunsFinalizationEventsHandler : ITestMessageEventHandler
{
/// <summary>
/// Dispatch SessionComplete event to listeners.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,6 @@ internal interface ITranslationLayerRequestSender : IDisposable
/// </summary>
/// <param name="attachments">List of attachements</param>
/// <param name="multiTestRunsFinalizationCompleteEventsHandler"></param>
void FinalizeMultiTestRuns(IEnumerable<AttachmentSet> attachments, IMultiTestRunsFinalizationCompleteEventsHandler multiTestRunsFinalizationCompleteEventsHandler);
void FinalizeMultiTestRuns(IEnumerable<AttachmentSet> attachments, IMultiTestRunsFinalizationEventsHandler multiTestRunsFinalizationCompleteEventsHandler);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ public interface IVsTestConsoleWrapper2 : IVsTestConsoleWrapper
/// </summary>
/// <param name="attachments">List of attachements</param>
/// <param name="multiTestRunsFinalizationCompleteEventsHandler">EventHandler to receive session complete event</param>
void FinalizeMultiTestRuns(IEnumerable<AttachmentSet> attachments, IMultiTestRunsFinalizationCompleteEventsHandler multiTestRunsFinalizationCompleteEventsHandler);
void FinalizeMultiTestRuns(IEnumerable<AttachmentSet> attachments, IMultiTestRunsFinalizationEventsHandler multiTestRunsFinalizationCompleteEventsHandler);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ public void EndSession()
}

/// <inheritdoc/>
public void FinalizeMultiTestRuns(IEnumerable<AttachmentSet> attachments, IMultiTestRunsFinalizationCompleteEventsHandler testSessionEventsHandler)
public void FinalizeMultiTestRuns(IEnumerable<AttachmentSet> attachments, IMultiTestRunsFinalizationEventsHandler testSessionEventsHandler)
{
this.SendMessageAndListenAndReportAttachements(attachments, testSessionEventsHandler);
}
Expand Down Expand Up @@ -732,7 +732,7 @@ private async Task SendMessageAndListenAndReportTestResultsAsync(string messageT
this.testPlatformEventSource.TranslationLayerExecutionStop();
}

private void SendMessageAndListenAndReportAttachements(IEnumerable<AttachmentSet> attachments, IMultiTestRunsFinalizationCompleteEventsHandler eventHandler)
private void SendMessageAndListenAndReportAttachements(IEnumerable<AttachmentSet> attachments, IMultiTestRunsFinalizationEventsHandler eventHandler)
{
try
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,10 +278,11 @@ public void EndSession()
#region IVsTestConsoleWrapper2

/// <inheritdoc/>
public void FinalizeMultiTestRuns(IEnumerable<AttachmentSet> attachments, IMultiTestRunsFinalizationCompleteEventsHandler testSessionEventsHandler)
public void FinalizeMultiTestRuns(IEnumerable<AttachmentSet> attachments, IMultiTestRunsFinalizationEventsHandler testSessionEventsHandler)
{
this.EnsureInitialized();
this.testPlatformEventSource.TranslationLayerMultiTestRunsFinalizationStart();

this.EnsureInitialized();
this.requestSender.FinalizeMultiTestRuns(attachments, testSessionEventsHandler);
}

Expand Down

0 comments on commit 04aac62

Please sign in to comment.