Skip to content

Commit c4639b6

Browse files
committed
add ok return for testing
1 parent 5affd21 commit c4639b6

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
using Microsoft.VisualStudio.Shell.Interop;
2-
using System;
1+
using System;
32
using System.Threading.Tasks;
43

54
namespace FineCodeCoverage.Engine.MsTestPlatform.CodeCoverage
65
{
76
internal interface IVsRunSettingsWriter
87
{
9-
Task RemoveRunSettingsFilePathAsync(Guid projectGuid);
8+
Task<bool> RemoveRunSettingsFilePathAsync(Guid projectGuid);
109
Task<bool> WriteRunSettingsFilePathAsync(Guid projectGuid, string projectRunSettingsFilePath);
1110
}
1211
}

SharedProject/Core/MsTestPlatform/CodeCoverage/VsRunSettingsWriter.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,18 +41,20 @@ public async Task<bool> WriteRunSettingsFilePathAsync(Guid projectGuid, string p
4141
return success;
4242
}
4343

44-
public async Task RemoveRunSettingsFilePathAsync(Guid projectGuid)
44+
public async Task<bool> RemoveRunSettingsFilePathAsync(Guid projectGuid)
4545
{
46+
var ok = false;
4647
await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync();
4748
var vsSolution = serviceProvider.GetService(typeof(SVsSolution)) as IVsSolution;
4849
Assumes.Present(vsSolution);
4950
if (vsSolution.GetProjectOfGuid(ref projectGuid, out var vsHierarchy) == VSConstants.S_OK)
5051
{
5152
if (vsHierarchy is IVsBuildPropertyStorage vsBuildPropertyStorage)
5253
{
53-
vsBuildPropertyStorage.RemoveProperty(projectRunSettingsFilePathElementName, null, 1);
54+
ok = vsBuildPropertyStorage.RemoveProperty(projectRunSettingsFilePathElementName, null, 1) == VSConstants.S_OK;
5455
}
5556
}
57+
return ok;
5658
}
5759

5860
}

0 commit comments

Comments
 (0)