From 4dacccc0617a03f93db8f34824c8eaf9ef9a435d Mon Sep 17 00:00:00 2001 From: sunjosep Date: Mon, 19 Aug 2024 17:53:17 -0400 Subject: [PATCH] Possible fix to unit test failure --- test/coverlet.core.tests/Coverage/CoverageTests.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/coverlet.core.tests/Coverage/CoverageTests.cs b/test/coverlet.core.tests/Coverage/CoverageTests.cs index 31a6f509e..c5ea95314 100644 --- a/test/coverlet.core.tests/Coverage/CoverageTests.cs +++ b/test/coverlet.core.tests/Coverage/CoverageTests.cs @@ -190,6 +190,7 @@ public void TestCoverageUnloadWithParameters() File.Copy(pdb, Path.Combine(directory.FullName, Path.GetFileName(pdb)), true); var mockInstrumentationHelper = new Mock(); + mockInstrumentationHelper.Setup(x => x.RestoreOriginalModule(It.IsAny(), It.IsAny())) var parameters = new CoverageParameters { @@ -224,9 +225,10 @@ public void TestCoverageUnloadWithNoParameters() File.Copy(pdb, Path.Combine(directory.FullName, Path.GetFileName(pdb)), true); var mockInstrumentationHelper = new Mock(); - mockInstrumentationHelper - .Setup(x => x.SelectModules(It.IsAny>(), It.IsAny(), It.IsAny())) - .Returns(new List(){"ModuleX"}); + mockInstrumentationHelper + .Setup(x => x.SelectModules(It.IsAny>(), It.IsAny(), It.IsAny())) + .Returns(new List(){"ModuleX"}); + mockInstrumentationHelper.Setup(x => x.RestoreOriginalModule(It.IsAny(), It.IsAny())) var parameters = new CoverageParameters {