forked from microsoft/vstest
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
committing changes for microsoft#958 fix
- Loading branch information
1 parent
3ce317c
commit 98cfefc
Showing
13 changed files
with
115 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66 changes: 66 additions & 0 deletions
66
...TestPlatform.CommunicationUtilities/EventHandlers/TestExtensionInitializeEventsHandler.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
// 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.CommunicationUtilities.EventHandlers | ||
{ | ||
using System; | ||
using System.Collections.Generic; | ||
|
||
using Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.Interfaces; | ||
using Microsoft.VisualStudio.TestPlatform.ObjectModel; | ||
using Microsoft.VisualStudio.TestPlatform.ObjectModel.Client; | ||
using Microsoft.VisualStudio.TestPlatform.ObjectModel.Engine; | ||
using Microsoft.VisualStudio.TestPlatform.ObjectModel.Logging; | ||
|
||
/// <summary> | ||
/// The test run events handler. | ||
/// </summary> | ||
public class TestExtensionInitializeEventsHandler : ITestMessageEventHandler | ||
{ | ||
private ITestRequestHandler requestHandler; | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the <see cref="TestExtensionInitializeEventsHandler"/> class. | ||
/// </summary> | ||
/// <param name="requestHandler">test request handler</param> | ||
public TestExtensionInitializeEventsHandler(ITestRequestHandler requestHandler) | ||
{ | ||
this.requestHandler = requestHandler; | ||
} | ||
|
||
/// <summary> | ||
/// Handles a test run message. | ||
/// </summary> | ||
/// <param name="level"> The level. </param> | ||
/// <param name="message"> The message. </param> | ||
public void HandleLogMessage(TestMessageLevel level, string message) | ||
{ | ||
switch ((TestMessageLevel)level) | ||
{ | ||
case TestMessageLevel.Informational: | ||
EqtTrace.Info(message); | ||
break; | ||
|
||
case TestMessageLevel.Warning: | ||
EqtTrace.Warning(message); | ||
break; | ||
|
||
case TestMessageLevel.Error: | ||
EqtTrace.Error(message); | ||
break; | ||
|
||
default: | ||
EqtTrace.Info(message); | ||
break; | ||
} | ||
|
||
this.requestHandler.SendLog(level, message); | ||
} | ||
|
||
public void HandleRawMessage(string rawMessage) | ||
{ | ||
// No-Op | ||
// TestHost at this point has no functionality where it requires rawmessage | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters