Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added test that MarkdownExporter.GitHub and MarkdownExporter.Atlassia…
…n are both accepted in the merged configuration
  • Loading branch information
bstordrup committed Aug 9, 2023
commit 8b7cd93b88ec78826acf71a8bbafb3131c23ad90
15 changes: 14 additions & 1 deletion tests/BenchmarkDotNet.Tests/Configs/ImmutableConfigTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,19 @@ public void DuplicateExportersAreExcluded()
Assert.Same(MarkdownExporter.GitHub, final.GetExporters().Single());
}

[Fact]
public void MultipleExportersOfSameTypeWithDifferentNamesAreAccepted()
{
var mutable = ManualConfig.CreateEmpty();

mutable.AddExporter(MarkdownExporter.GitHub);
mutable.AddExporter(MarkdownExporter.Atlassian);

var final = ImmutableConfigBuilder.Create(mutable);

Assert.Equal(2, final.GetExporters().Count());
}

[Fact]
public void DuplicateAnalyzersAreExcluded()
{
Expand Down Expand Up @@ -380,7 +393,7 @@ private static ImmutableConfig[] AddLeftToTheRightAndRightToTheLef(ManualConfig
var leftAddedToTheRight = ManualConfig.Create(right);
leftAddedToTheRight.Add(left);

return new[]{ rightAddedToLeft.CreateImmutableConfig(), leftAddedToTheRight.CreateImmutableConfig() };
return new[] { rightAddedToLeft.CreateImmutableConfig(), leftAddedToTheRight.CreateImmutableConfig() };
}

public class TestExporter : IExporter, IExporterDependencies
Expand Down