diff --git a/src/Machine.Specifications.Runner.ReSharper.Adapters/Machine.Specifications.Runner.ReSharper.Adapters.csproj b/src/Machine.Specifications.Runner.ReSharper.Adapters/Machine.Specifications.Runner.ReSharper.Adapters.csproj index 8ad8d90..4229577 100644 --- a/src/Machine.Specifications.Runner.ReSharper.Adapters/Machine.Specifications.Runner.ReSharper.Adapters.csproj +++ b/src/Machine.Specifications.Runner.ReSharper.Adapters/Machine.Specifications.Runner.ReSharper.Adapters.csproj @@ -13,8 +13,8 @@ - - + + diff --git a/src/Machine.Specifications.Runner.ReSharper.Tasks/Machine.Specifications.Runner.ReSharper.Tasks.csproj b/src/Machine.Specifications.Runner.ReSharper.Tasks/Machine.Specifications.Runner.ReSharper.Tasks.csproj index f43aa01..e7db0fb 100644 --- a/src/Machine.Specifications.Runner.ReSharper.Tasks/Machine.Specifications.Runner.ReSharper.Tasks.csproj +++ b/src/Machine.Specifications.Runner.ReSharper.Tasks/Machine.Specifications.Runner.ReSharper.Tasks.csproj @@ -12,7 +12,7 @@ - + diff --git a/src/Machine.Specifications.Runner.ReSharper.Tests/Machine.Specifications.Runner.ReSharper.Tests.csproj b/src/Machine.Specifications.Runner.ReSharper.Tests/Machine.Specifications.Runner.ReSharper.Tests.csproj index dcca2e5..dad473f 100644 --- a/src/Machine.Specifications.Runner.ReSharper.Tests/Machine.Specifications.Runner.ReSharper.Tests.csproj +++ b/src/Machine.Specifications.Runner.ReSharper.Tests/Machine.Specifications.Runner.ReSharper.Tests.csproj @@ -11,15 +11,15 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - - + + - + diff --git a/src/Machine.Specifications.Runner.ReSharper.Tests/TestFramework/Execution/EmptyPreparedProcess.cs b/src/Machine.Specifications.Runner.ReSharper.Tests/TestFramework/Execution/EmptyPreparedProcess.cs index b496c3a..f295369 100644 --- a/src/Machine.Specifications.Runner.ReSharper.Tests/TestFramework/Execution/EmptyPreparedProcess.cs +++ b/src/Machine.Specifications.Runner.ReSharper.Tests/TestFramework/Execution/EmptyPreparedProcess.cs @@ -1,9 +1,10 @@ using System; using JetBrains.Util; +using JetBrains.Util.Processes; namespace Machine.Specifications.Runner.ReSharper.Tests.TestFramework.Execution; -public class EmptyPreparedProcess : IPreparedProcess +public class EmptyPreparedProcess : IPreparedProcessWithCachedOutput { public int ProcessId => 0; diff --git a/src/Machine.Specifications.Runner.ReSharper.Tests/TestFramework/Execution/ExecutionAgent.cs b/src/Machine.Specifications.Runner.ReSharper.Tests/TestFramework/Execution/ExecutionAgent.cs index 3effb79..58b583b 100644 --- a/src/Machine.Specifications.Runner.ReSharper.Tests/TestFramework/Execution/ExecutionAgent.cs +++ b/src/Machine.Specifications.Runner.ReSharper.Tests/TestFramework/Execution/ExecutionAgent.cs @@ -6,7 +6,8 @@ using JetBrains.ReSharper.TestRunner.Abstractions.Objects; using JetBrains.ReSharper.UnitTestFramework; using JetBrains.ReSharper.UnitTestFramework.Execution.TestRunner; -using JetBrains.Util; +using JetBrains.ReSharper.UnitTestFramework.Execution.TestRunner.Activation; +using JetBrains.Util.Processes; namespace Machine.Specifications.Runner.ReSharper.Tests.TestFramework.Execution; @@ -27,7 +28,7 @@ public Task Shutdown() public Lifetime Lifetime { get; } = Lifetime.Eternal; - public IPreparedProcess Process { get; } = new EmptyPreparedProcess(); + public IPreparedProcessWithCachedOutput Process { get; } = new EmptyPreparedProcess(); public IMessageBroker MessageBroker { get; } @@ -35,6 +36,10 @@ public Task Shutdown() public ITestRunnerExecutionContext Context { get; } + public IRemoteAgentSerializers Serializers { get; } + + public ITestRunnerMessageHandlerRegistry MessageHandlers { get; } + public async Task RunTests(CancellationToken cancelCt, CancellationToken abortCt) { cancelCt.Register(() => MessageBroker.Abort()); @@ -66,4 +71,8 @@ private void ReportUnitTestElements(ITestRunnerRemoteTaskDepot depot) } } } + + public void Dispose() + { + } } diff --git a/src/Machine.Specifications.Runner.ReSharper.Tests/TestFramework/UnitTestSessionConductor.cs b/src/Machine.Specifications.Runner.ReSharper.Tests/TestFramework/UnitTestSessionConductor.cs index b2fe0af..2335f48 100644 --- a/src/Machine.Specifications.Runner.ReSharper.Tests/TestFramework/UnitTestSessionConductor.cs +++ b/src/Machine.Specifications.Runner.ReSharper.Tests/TestFramework/UnitTestSessionConductor.cs @@ -3,7 +3,6 @@ using JetBrains.Application.UI.ActionSystem.ActionBar; using JetBrains.Application.UI.Components; using JetBrains.Application.UI.Components.Theming; -using JetBrains.Application.UI.ToolWindowManagement; using JetBrains.Lifetimes; using JetBrains.ProjectModel; using JetBrains.ReSharper.Psi.Caches; @@ -23,6 +22,7 @@ using JetBrains.ReSharper.UnitTestFramework.UI.ViewModels.TreeModel.Nodes; using System.Collections.Generic; using JetBrains.Application.Components; +using System.Threading.Tasks; namespace Machine.Specifications.Runner.ReSharper.Tests.TestFramework; @@ -41,16 +41,15 @@ public UnitTestSessionConductor( IActionManager actionManager, IActionBarManager actionBarManager, IPersistentIndexManager persistentIndexManager, - ToolWindowManager toolWindowManager, IUnitTestSessionRepository sessionRepository, IEnumerable previewPanelFactories, ILogger logger) - : base(serializer, lifetime, solution, theming, application, settings, actionManager, actionBarManager, persistentIndexManager, toolWindowManager, sessionRepository, logger) + : base(serializer, lifetime, solution, theming, application, settings, actionManager, actionBarManager, persistentIndexManager, sessionRepository, logger) { this.previewPanelFactories = previewPanelFactories; } - public override IUnitTestSessionTreeViewModel OpenSession(IUnitTestSession session, bool activate = true) + public override Task OpenSession(IUnitTestSession session, bool activate = true) { EnsureSessionsAreOpened(); @@ -61,11 +60,12 @@ public override IUnitTestSessionTreeViewModel OpenSession(IUnitTestSession sessi ActiveSession.Value = viewModel; } - return viewModel; + return Task.FromResult(viewModel); } - public override void CloseSession(IUnitTestSession session) + public override Task CloseSession(IUnitTestSession session) { + return Task.CompletedTask; } private IUnitTestSessionTreeViewModel CreateViewModel(IUnitTestSession session) diff --git a/src/Machine.Specifications.Runner.ReSharper.Tests/TestFramework/UnitTestSourceTestBase.cs b/src/Machine.Specifications.Runner.ReSharper.Tests/TestFramework/UnitTestSourceTestBase.cs index e73512f..96ace7d 100644 --- a/src/Machine.Specifications.Runner.ReSharper.Tests/TestFramework/UnitTestSourceTestBase.cs +++ b/src/Machine.Specifications.Runner.ReSharper.Tests/TestFramework/UnitTestSourceTestBase.cs @@ -37,7 +37,7 @@ protected override void DoTest(Lifetime lifetime, IProject project) var observer = new TestElementObserverOnFile(transaction.Observer, file!.GetSourceFile()); - fileExplorer.ProcessFile(file, observer, InterruptableReadActivity.Empty); + fileExplorer.ProcessFile(file, observer, () => false); DumpElements(transaction.Elements, projectFile.Name + ".source"); } diff --git a/src/Machine.Specifications.Runner.ReSharper/Machine.Specifications.Runner.ReSharper.csproj b/src/Machine.Specifications.Runner.ReSharper/Machine.Specifications.Runner.ReSharper.csproj index d04f714..0796304 100644 --- a/src/Machine.Specifications.Runner.ReSharper/Machine.Specifications.Runner.ReSharper.csproj +++ b/src/Machine.Specifications.Runner.ReSharper/Machine.Specifications.Runner.ReSharper.csproj @@ -19,7 +19,7 @@ Machine Machine test;unit;testing;context;specification;bdd;tdd;mspec;runner;resharper - Adds support for R# and Rider 2024.1 + Adds support for R# and Rider 2024.2 Machine.png http://github.com/machine/machine.specifications.runner.resharper/raw/master/images/icon.png https://github.com/machine/machine.specifications.runner.resharper @@ -28,13 +28,13 @@ - 2024.1.0 + 2024.2.0 $(SdkVersion.Substring(2,2))$(SdkVersion.Substring(5,1)) $(WaveVersionBase).0.0 - + diff --git a/src/Machine.Specifications.Runner.ReSharper/MspecTestRunnerOrchestrator.cs b/src/Machine.Specifications.Runner.ReSharper/MspecTestRunnerOrchestrator.cs index 7a71cdd..72b41d8 100644 --- a/src/Machine.Specifications.Runner.ReSharper/MspecTestRunnerOrchestrator.cs +++ b/src/Machine.Specifications.Runner.ReSharper/MspecTestRunnerOrchestrator.cs @@ -23,7 +23,7 @@ public class MspecTestRunnerOrchestrator : ITestRunnerAdapter public TestAdapterLoader GetTestAdapterLoader(ITestRunnerContext context) { - var framework = context.RuntimeEnvironment.TargetFrameworkId.IsNetCoreSdk() + var framework = context.RuntimeDescriptor.TargetFrameworkId.IsNetCoreSdk() ? "netstandard20" : "net461"; diff --git a/src/Machine.Specifications.Runner.ReSharper/Runner/MspecTestRunnerRunStrategy.cs b/src/Machine.Specifications.Runner.ReSharper/Runner/MspecTestRunnerRunStrategy.cs index 6d3201c..a387c5a 100644 --- a/src/Machine.Specifications.Runner.ReSharper/Runner/MspecTestRunnerRunStrategy.cs +++ b/src/Machine.Specifications.Runner.ReSharper/Runner/MspecTestRunnerRunStrategy.cs @@ -1,5 +1,4 @@ using JetBrains.ProjectModel; -using JetBrains.ProjectModel.DotNetCore; using JetBrains.ReSharper.UnitTestFramework.Execution.TestRunner; using JetBrains.ReSharper.UnitTestFramework.Execution.TestRunner.DataCollection; using JetBrains.ReSharper.UnitTestFramework.Exploration.Artifacts; @@ -12,11 +11,9 @@ public class MspecTestRunnerRunStrategy : TestRunnerRunStrategy public MspecTestRunnerRunStrategy( IDataCollectorFactory dataCollectorFactory, IAgentManagerHost agentManagerHost, - ITestRunnerHostSource testRunnerHostSource, MspecTestRunnerOrchestrator adapter, - IUnitTestProjectArtifactResolver artifactResolver, - DotNetCoreLaunchSettingsJsonProfileProvider launchSettingsProvider) - : base(dataCollectorFactory, agentManagerHost.AgentManager, testRunnerHostSource, adapter, artifactResolver, launchSettingsProvider) + IUnitTestProjectArtifactResolver artifactResolver) + : base(dataCollectorFactory, agentManagerHost.AgentManager, adapter, artifactResolver) { } }