dotnet-installer/test/EndToEnd/TelemetryOptOutDefaultTests.cs

25 lines
761 B
C#
Raw Normal View History

using System.IO;
using FluentAssertions;
using Microsoft.DotNet.Tools.Test.Utilities;
using Xunit;
namespace EndToEnd.Tests
{
public class TelemetryOptOutDefault : TestBase
{
[Fact]
public void TelemetryOptOutDefaultAttribute()
{
2022-11-05 22:13:09 +00:00
var versionCommand = new DotnetCommand()
.ExecuteWithCapturedOutput("--version");
2022-11-05 22:13:09 +00:00
var sdkVersion = versionCommand.StdOut.Trim();
var dotnetdir = Path.Combine(Path.GetDirectoryName(RepoDirectoriesProvider.DotnetUnderTest), "sdk", sdkVersion);
var result = AssemblyInfo.Get(Path.Combine(dotnetdir, "dotnet.dll"), "AssemblyMetadataAttribute");
result.Should().Contain("TelemetryOptOutDefault:False");
}
}
}