#region ========================================================================= USING =====================================================================================
using System;
using System.Diagnostics.CodeAnalysis;
using Xunit;
#endregion
namespace Nemera.Presentation.Api.IntegrationTests.Common.Setup;
///
/// Marks a test that only runs when the API assembly was produced by an official release build.
///
[AttributeUsage(AttributeTargets.Method)]
[ExcludeFromCodeCoverage]
public sealed class OfficialReleaseFactAttribute : FactAttribute
{
///
/// Gets the reason to skip the test. If set, the test will be skipped instead of executed.
///
///
/// xUnit evaluates Skip during test discovery, so the attribute decides at runtime whether the test runs. A normal test run skips official-only tests instead of failing them.
///
public override string Skip => OfficialReleaseBuildDetector.IsOfficialReleaseBuild()
? string.Empty
: "The API assembly was not produced by an official release build.";
}