Skip to content

Commit

Permalink
Add tests for EmbedUntrackedSources
Browse files Browse the repository at this point in the history
  • Loading branch information
MattKotsenas committed Aug 27, 2024
1 parent b195e98 commit 509ec14
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/DotNet.ReproducibleBuilds.Tests/SourceLinkTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,19 @@ public void DebugTypeIsSet(string? debugType, string expected)
.GetPropertyValue("DebugType")
.Should().Be(expected);
}

[Theory]
[InlineData(null, true)]
[InlineData(false, false)]
[InlineData(true, true)]
public void EmbedUntrackedSourcesIsSet(bool? embedUntrackedSources, bool expected)
{
ProjectCreator.Templates
.ReproducibleBuildProject(TestRootPath)
.PropertyGroup()
.Property("PublishRepositoryUrl", embedUntrackedSources.ToLowerInvariant())
.Project
.GetPropertyValue("PublishRepositoryUrl")
.Should().Be(expected.ToLowerInvariant());
}
}

0 comments on commit 509ec14

Please sign in to comment.