using System.Reflection; using Admin.NET.Plugin.AiDOP.DataPlatform.UnifiedIngress; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Xunit; namespace Admin.NET.Plugin.AiDOP.Tests.DataPlatform; public sealed class MdpIngestEndpointTests { [Fact] public void UnifiedIngestExposesDatasetPostUsingDedicatedAuthentication() { var controller = Assert.Single(typeof(MdpIngestDatasetController).Assembly.GetTypes().Where(type => type.GetCustomAttribute()?.Template == "api/v1/ingest")); var post = Assert.Single(controller.GetMethods().Where(method => method.GetCustomAttribute()?.Template == "{datasetKey}")); Assert.NotNull(post); Assert.Equal("MdpUnifiedIngress", controller.GetCustomAttribute()?.AuthenticationSchemes); } }