Skip to content

Commit

Permalink
Possible fix to unit test failure
Browse files Browse the repository at this point in the history
  • Loading branch information
JosephSun2003 committed Aug 19, 2024
1 parent 6d32ae5 commit 4dacccc
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test/coverlet.core.tests/Coverage/CoverageTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ public void TestCoverageUnloadWithParameters()
File.Copy(pdb, Path.Combine(directory.FullName, Path.GetFileName(pdb)), true);

var mockInstrumentationHelper = new Mock<IInstrumentationHelper>();
mockInstrumentationHelper.Setup(x => x.RestoreOriginalModule(It.IsAny<string>(), It.IsAny<string>()))

var parameters = new CoverageParameters
{
Expand Down Expand Up @@ -224,9 +225,10 @@ public void TestCoverageUnloadWithNoParameters()
File.Copy(pdb, Path.Combine(directory.FullName, Path.GetFileName(pdb)), true);

var mockInstrumentationHelper = new Mock<IInstrumentationHelper>();
mockInstrumentationHelper
.Setup(x => x.SelectModules(It.IsAny<IEnumerable<string>>(), It.IsAny<string[]>(), It.IsAny<string[]>()))
.Returns(new List<string>(){"ModuleX"});
mockInstrumentationHelper
.Setup(x => x.SelectModules(It.IsAny<IEnumerable<string>>(), It.IsAny<string[]>(), It.IsAny<string[]>()))
.Returns(new List<string>(){"ModuleX"});
mockInstrumentationHelper.Setup(x => x.RestoreOriginalModule(It.IsAny<string>(), It.IsAny<string>()))

var parameters = new CoverageParameters
{
Expand Down

0 comments on commit 4dacccc

Please sign in to comment.