Skip to content

Commit

Permalink
Merge pull request #211 from tonyhallett/update-tests-for-last-pull
Browse files Browse the repository at this point in the history
updated tests
  • Loading branch information
tonyhallett authored Nov 18, 2021
2 parents f8a119a + 5de30fb commit 57ab677
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public void SetUp()
mockCoverageProject.Setup(cp => cp.Settings).Returns(new Mock<IAppOptions>().Object);
mockCoverageProject.Setup(cp => cp.CoverageOutputFolder).Returns("");
mockCoverageProject.Setup(cp => cp.ExcludedReferencedProjects).Returns(new List<string>());
mockCoverageProject.Setup(cp => cp.IncludedReferencedProjects).Returns(new List<string>());
mockRunSettingsCoverletConfiguration = new Mock<IRunSettingsCoverletConfiguration>();
coverletDataCollectorUtil.runSettingsCoverletConfiguration = mockRunSettingsCoverletConfiguration.Object;
coverletDataCollectorUtil.coverageProject = mockCoverageProject.Object;
Expand Down Expand Up @@ -78,7 +79,7 @@ public async Task Should_Get_Settings_With_Exclude_From_CoverageProject_And_RunS
mockCoverageProject.Setup(cp => cp.ExcludedReferencedProjects).Returns(referencedExcluded);
mockRunSettingsCoverletConfiguration.Setup(rsc => rsc.Exclude).Returns("rsexclude");
await coverletDataCollectorUtil.RunAsync(false);
mockDataCollectorSettingsBuilder.Verify(b => b.WithExclude(new string[] { "referencedExcluded","excluded"},"rsexclude"));
mockDataCollectorSettingsBuilder.Verify(b => b.WithExclude(new string[] { "[referencedExcluded]*","excluded"},"rsexclude"));
}

[Test]
Expand All @@ -89,7 +90,7 @@ public async Task Should_Not_Throw_When_Project_Setttings_Exclude_Is_Null()
mockCoverageProject.Setup(cp => cp.CoverageOutputFolder).Returns("");
mockRunSettingsCoverletConfiguration.Setup(rsc => rsc.Exclude).Returns("rsexclude");
await coverletDataCollectorUtil.RunAsync(false);
mockDataCollectorSettingsBuilder.Verify(b => b.WithExclude(new string[] { "referencedExcluded"}, "rsexclude"));
mockDataCollectorSettingsBuilder.Verify(b => b.WithExclude(new string[] { "[referencedExcluded]*"}, "rsexclude"));
}

[Test]
Expand Down

0 comments on commit 57ab677

Please sign in to comment.