Making the version check an optional message for test discovery and test run.
This commit is contained in:
parent
7407a898e0
commit
252eb4371f
4 changed files with 43 additions and 7 deletions
|
@ -61,7 +61,7 @@ namespace Microsoft.Dotnet.Tools.Test.Tests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
public void It_returns_NoOp_if_the_dotnet_test_state_is_not_VersionCheckCompleted()
|
||||
public void It_returns_NoOp_if_the_dotnet_test_state_is_not_VersionCheckCompleted_or_InitialState()
|
||||
{
|
||||
var dotnetTestMock = new Mock<IDotnetTest>();
|
||||
dotnetTestMock.Setup(d => d.State).Returns(DotnetTestState.Terminated);
|
||||
|
@ -84,7 +84,19 @@ namespace Microsoft.Dotnet.Tools.Test.Tests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
public void It_returns_TestDiscoveryCompleted_when_it_handles_the_message()
|
||||
public void It_returns_TestDiscoveryCompleted_when_it_handles_the_message_and_current_state_is_InitialState()
|
||||
{
|
||||
var dotnetTestMock = new Mock<IDotnetTest>();
|
||||
dotnetTestMock.Setup(d => d.State).Returns(DotnetTestState.InitialState);
|
||||
|
||||
var nextState =
|
||||
_testDiscoveryStartMessageHandler.HandleMessage(dotnetTestMock.Object, _validMessage);
|
||||
|
||||
nextState.Should().Be(DotnetTestState.TestDiscoveryStarted);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void It_returns_TestDiscoveryCompleted_when_it_handles_the_message_and_current_state_is_VersionCheckCompleted()
|
||||
{
|
||||
var nextState =
|
||||
_testDiscoveryStartMessageHandler.HandleMessage(_dotnetTestAtVersionCheckCompletedState, _validMessage);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue