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

BatchSize Runsettings #550

Merged
merged 4 commits into from
Mar 1, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merging the two test files for the same class and removing the redund…
…ant test.
  • Loading branch information
singhsarab committed Feb 28, 2017
commit e4573d6ae93d630bda7468d94c3683403ba91a13
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ namespace vstest.console.UnitTests.TestPlatformHelpers
using System.Threading;
using System.Diagnostics;
using Microsoft.VisualStudio.TestPlatform.ObjectModel;
using vstest.console.UnitTests.TestDoubles;

[TestClass]
public class TestRequestManagerTests
Expand All @@ -43,6 +44,42 @@ public void TestInit()
this.mockTestPlatformEventSource.Object);
}

[TestCleanup]
public void Cleanup()
{
CommandLineOptions.Instance.Reset();
}

[TestMethod]
public void TestRequestManagerShouldInitializeConsoleLogger()
{
var mockLoggerEvents = new DummyLoggerEvents(TestSessionMessageLogger.Instance);
Copy link
Contributor

Choose a reason for hiding this comment

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

Please make these instance variables.

(These are copied from earlier code, good to clean up)

var mockLoggerManager = new DummyTestLoggerManager(mockLoggerEvents);
CommandLineOptions.Instance.IsDesignMode = false;
var requestManager = new TestRequestManager(CommandLineOptions.Instance,
new Mock<ITestPlatform>().Object,
mockLoggerManager,
TestRunResultAggregator.Instance,
new Mock<ITestPlatformEventSource>().Object);

Assert.IsTrue(mockLoggerEvents.EventsSubscribed());
}

[TestMethod]
public void TestRequestManagerShouldNotInitializeConsoleLoggerIfDesignModeIsSet()
{
var mockLoggerEvents = new DummyLoggerEvents(TestSessionMessageLogger.Instance);
var mockLoggerManager = new DummyTestLoggerManager(mockLoggerEvents);
CommandLineOptions.Instance.IsDesignMode = true;
var requestManager = new TestRequestManager(CommandLineOptions.Instance,
new Mock<ITestPlatform>().Object,
mockLoggerManager,
TestRunResultAggregator.Instance,
new Mock<ITestPlatformEventSource>().Object);

Assert.IsFalse(mockLoggerEvents.EventsSubscribed());
}

[TestMethod]
public void InitializeExtensionsShouldCallTestPlatformToInitialize()
{
Expand Down
99 changes: 0 additions & 99 deletions test/vstest.console.UnitTests/TestRequestManagerTests.cs

This file was deleted.