Skip to content

Commit

Permalink
updated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyhallett committed Nov 18, 2021
1 parent f8a119a commit 5de30fb
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 5de30fb

Please sign in to comment.