using System.Reflection; using JobTrackerApi.Controllers; using Xunit; namespace JobTrackerApi.Tests; public sealed class OwnershipGuardTests { [Fact] public void Attachments_controller_has_owned_attachment_lookup_helper() { var method = typeof(AttachmentsController).GetMethod("FindOwnedAttachmentAsync", BindingFlags.NonPublic | BindingFlags.Instance); Assert.NotNull(method); } [Fact] public void Correspondence_controller_has_owned_message_lookup_helper() { var method = typeof(CorrespondenceController).GetMethod("FindOwnedMessageAsync", BindingFlags.NonPublic | BindingFlags.Instance); Assert.NotNull(method); } }