Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ public class RunSettingsServiceUnderTest : RunSettingsService
{
private readonly string _solutionRunSettingsFile;

internal RunSettingsServiceUnderTest(IGlobalRunSettings globalRunSettings, string solutionRunSettingsFile)
internal RunSettingsServiceUnderTest(IGlobalRunSettings2 globalRunSettings, string solutionRunSettingsFile)
: base(globalRunSettings)
{
_solutionRunSettingsFile = solutionRunSettingsFile;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ private RunSettingsService SetupRunSettingsService(string solutionRunSettingsFil
TraitsRegexesBefore = "Global"
};

var mockGlobalRunSettings = new Mock<IGlobalRunSettings>();
var mockGlobalRunSettings = new Mock<IGlobalRunSettings2>();
mockGlobalRunSettings.Setup(grs => grs.RunSettings).Returns(globalRunSettings);

return new RunSettingsServiceUnderTest(mockGlobalRunSettings.Object, solutionRunSettingsFile);
Expand Down Expand Up @@ -345,7 +345,7 @@ private RunSettingsContainer SetupFinalRunSettingsContainer(
string userSolutionWorkingDir, string userProject1WorkingDir, string userProject3WorkingDir)
{
var globalSettings = new RunSettings { ProjectRegex = null, WorkingDir = GlobalWorkingDir };
var mockGlobalRunSettings = new Mock<IGlobalRunSettings>();
var mockGlobalRunSettings = new Mock<IGlobalRunSettings2>();
mockGlobalRunSettings.Setup(grs => grs.RunSettings).Returns(globalSettings);

var solutionSettingsContainer = SetupSettingsContainer(solutionSolutionWorkingDir, solutionProject1WorkingDir, solutionProject2WorkingDir, null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
namespace GoogleTestAdapter.TestAdapter.Settings
{

[Export(typeof(IGlobalRunSettings))]
[Export(typeof(IGlobalRunSettingsInternal))]
public class GlobalRunSettingsProvider : IGlobalRunSettingsInternal
[Export(typeof(IGlobalRunSettings2))]
[Export(typeof(IGlobalRunSettingsInternal2))]
public class GlobalRunSettingsProvider : IGlobalRunSettingsInternal2
{
public RunSettings RunSettings { get; set; } = new RunSettings();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace GoogleTestAdapter.TestAdapter.Settings
{

public interface IGlobalRunSettings
public interface IGlobalRunSettings2
{
RunSettings RunSettings { get; }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace GoogleTestAdapter.TestAdapter.Settings
{

public interface IGlobalRunSettingsInternal : IGlobalRunSettings
public interface IGlobalRunSettingsInternal2 : IGlobalRunSettings2
{
new RunSettings RunSettings { get; set; }
}
Expand Down
4 changes: 2 additions & 2 deletions GoogleTestAdapter/TestAdapter/Settings/RunSettingsService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ public class RunSettingsService : IRunSettingsService
{
public string Name => GoogleTestConstants.SettingsName;

private readonly IGlobalRunSettings _globalRunSettings;
private readonly IGlobalRunSettings2 _globalRunSettings;

[ImportingConstructor]
public RunSettingsService([Import(typeof(IGlobalRunSettings))] IGlobalRunSettings globalRunSettings)
public RunSettingsService([Import(typeof(IGlobalRunSettings2))] IGlobalRunSettings2 globalRunSettings)
{
_globalRunSettings = globalRunSettings;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ protected override void Initialize()
if (!_isAsyncLoadSupported)
{
var componentModel = (IComponentModel)GetGlobalService(typeof(SComponentModel));
_globalRunSettings = componentModel.GetService<IGlobalRunSettingsInternal>();
_globalRunSettings = componentModel.GetService<IGlobalRunSettingsInternal2>();
DoInitialize();
}
}
Expand All @@ -46,7 +46,7 @@ IVsTask IAsyncLoadablePackageInitialize.Initialize(IAsyncServiceProvider service
return ThreadHelper.JoinableTaskFactory.RunAsync<object>(async () =>
{
var componentModel = await serviceProvider.GetServiceAsync<IComponentModel>(typeof(SComponentModel));
_globalRunSettings = componentModel.GetService<IGlobalRunSettingsInternal>();
_globalRunSettings = componentModel.GetService<IGlobalRunSettingsInternal2>();

await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public sealed partial class GoogleTestExtensionOptionsPage : IGoogleTestExtensio
{
private readonly string _debuggingNamedPipeId = Guid.NewGuid().ToString();

private IGlobalRunSettingsInternal _globalRunSettings;
private IGlobalRunSettingsInternal2 _globalRunSettings;

private GeneralOptionsDialogPage _generalOptions;
private ParallelizationOptionsDialogPage _parallelizationOptions;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ protected override async System.Threading.Tasks.Task InitializeAsync(Cancellatio
await base.InitializeAsync(cancellationToken, progress);

var componentModel = await GetServiceAsync(typeof(SComponentModel)) as IComponentModel;
_globalRunSettings = componentModel.GetService<IGlobalRunSettingsInternal>();
_globalRunSettings = componentModel.GetService<IGlobalRunSettingsInternal2>();

await this.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);

Expand Down