Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
mmanela committed Nov 14, 2018
1 parent 97eead0 commit 7de938a
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions VS2012.TestAdapter/DiscoveryCallback.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public DiscoveryCallback(IMessageLogger logger, ITestCaseDiscoverySink discovery
this.discoverySink = discoverySink;
}

public override void FileError(TestError error)
public override void FileError(TestContext context, TestError error)
{
logger.SendMessage(TestMessageLevel.Error, GetFileErrorMessage(error));
}
Expand All @@ -26,7 +26,7 @@ public override void ExceptionThrown(Exception exception, string fileName)
logger.SendMessage(TestMessageLevel.Error, GetExceptionThrownMessage(exception, fileName));
}

public override void TestFinished(TestCase test)
public override void TestFinished(TestContext context, TestCase test)
{
var testCase = test.ToVsTestCase();
discoverySink.SendTestCase(testCase);
Expand Down
12 changes: 6 additions & 6 deletions VS2012.TestAdapter/ExecutionCallback.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ public ExecutionCallback(IFrameworkHandle frameworkHandle, IRunContext runContex
this.runContext = runContext;
}

public override void FileError(TestError error)
public override void FileError(TestContext context, TestError error)
{
frameworkHandle.SendMessage(TestMessageLevel.Error, GetFileErrorMessage(error));
}

public override void FileLog(TestLog log)
public override void FileLog(TestContext context, TestLog log)
{
frameworkHandle.SendMessage(TestMessageLevel.Informational, GetFileLogMessage(log));
}
Expand All @@ -39,7 +39,7 @@ public override void ExceptionThrown(Exception exception, string fileName)
frameworkHandle.SendMessage(TestMessageLevel.Error, GetExceptionThrownMessage(exception, fileName));
}

public override void TestStarted(TestCase test)
public override void TestStarted(TestContext context, TestCase test)
{
var testCase = test.ToVsTestCase();

Expand All @@ -48,7 +48,7 @@ public override void TestStarted(TestCase test)

}

public override void TestFinished(TestCase test)
public override void TestFinished(TestContext context, TestCase test)
{
var testCase = test.ToVsTestCase();
var result = test.ToVsTestResult();
Expand All @@ -61,9 +61,9 @@ public override void TestFinished(TestCase test)
frameworkHandle.RecordEnd(testCase, outcome);
}

public override void TestSuiteFinished(TestCaseSummary testResultsSummary)
public override void TestSuiteFinished(TestContext context, TestCaseSummary testResultsSummary)
{
base.TestSuiteFinished(testResultsSummary);
base.TestSuiteFinished(context, testResultsSummary);

if(!runContext.IsDataCollectionEnabled || testResultsSummary.CoverageObject == null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public VisualStudioRunnerCallback(DTE2 dte, IVsStatusbar statusBar)
this.statusBar = statusBar;
}

public override void TestSuiteStarted()
public override void TestSuiteStarted(TestContext context)
{
dte.ToolWindows.OutputWindow.Parent.Activate();
dte.ToolWindows.ErrorList.Parent.Activate();
Expand All @@ -31,7 +31,7 @@ public override void TestSuiteStarted()
SetStatusBarMessage("Testing Started");
}

public override void TestSuiteFinished(TestCaseSummary testResultsSummary)
public override void TestSuiteFinished(TestContext context, TestCaseSummary testResultsSummary)
{
var statusBarText = "";
if (testResultsSummary.SkippedCount > 0)
Expand All @@ -48,13 +48,13 @@ public override void TestSuiteFinished(TestCaseSummary testResultsSummary)
SetStatusBarMessage(statusBarText);
}

public override void FileStarted(string fileName)
public override void FileStarted(TestContext context)
{
var text = string.Format("------ Test started: File: {0} ------\n", fileName);
var text = string.Format("------ Test started: File: {0} ------\n", context?.InputTestFilesString);
testPane.OutputString(text);
}

public override void FileFinished(string fileName, TestFileSummary testResultsSummary)
public override void FileFinished(TestContext context, TestFileSummary testResultsSummary)
{
var text = "";

Expand All @@ -69,29 +69,29 @@ public override void FileFinished(string fileName, TestFileSummary testResultsSu
testPane.OutputString(text);
}

protected override void TestFailed(TestCase result)
protected override void TestFailed(TestContext context, TestCase result)
{
var errorMessage = GetTestFailureMessage(result);
WriteToOutputPaneAndErrorTaskList(result.InputTestFile, errorMessage, errorMessage, result.Line);
SetStatusBarMessage(GetStatusBarMessage(result));
}

protected override void TestPassed(TestCase result)
protected override void TestPassed(TestContext context, TestCase result)
{
SetStatusBarMessage(GetStatusBarMessage(result));
}

protected override void TestSkipped(TestCase result)
protected override void TestSkipped(TestContext context, TestCase result)
{
SetStatusBarMessage(GetStatusBarMessage(result));
}

public override void FileError(TestError error)
public override void FileError(TestContext context, TestError error)
{
testPane.OutputString(GetFileErrorMessage(error));
}

public override void FileLog(TestLog log)
public override void FileLog(TestContext context, TestLog log)
{
testPane.OutputString(GetFileLogMessage(log));
}
Expand Down

1 comment on commit 7de938a

@zrajnai
Copy link

@zrajnai zrajnai commented on 7de938a Nov 15, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for not including these changes originally 😭 and thanks for merging my PR 😊
Our build is now using 4.4.3 without any problems in the # of reported test by TeamCity 👍

Please sign in to comment.