From 54de0ce1c31cc930f0d289d89eb2a2deb5d93df7 Mon Sep 17 00:00:00 2001 From: Joseph Doherty Date: Tue, 6 Jan 2026 11:37:36 -0500 Subject: [PATCH] test: add LookupApiClientIntegrationTests for lookup endpoint validation Add 4 integration tests for LookupApiClient that verify lookup endpoints work correctly through the actual HTTP pipeline without authentication. --- .../LookupApiClientIntegrationTests.cs | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 NEW/tests/JdeScoping.Api.IntegrationTests/ClientIntegration/LookupApiClientIntegrationTests.cs diff --git a/NEW/tests/JdeScoping.Api.IntegrationTests/ClientIntegration/LookupApiClientIntegrationTests.cs b/NEW/tests/JdeScoping.Api.IntegrationTests/ClientIntegration/LookupApiClientIntegrationTests.cs new file mode 100644 index 0000000..07e210d --- /dev/null +++ b/NEW/tests/JdeScoping.Api.IntegrationTests/ClientIntegration/LookupApiClientIntegrationTests.cs @@ -0,0 +1,53 @@ +using JdeScoping.Client.Services; +using Shouldly; + +namespace JdeScoping.Api.IntegrationTests.ClientIntegration; + +public class LookupApiClientIntegrationTests : ClientIntegrationTestBase +{ + public LookupApiClientIntegrationTests(TestWebApplicationFactory factory) : base(factory) { } + + [Fact] + public async Task FindItemsAsync_WithoutAuth_ReturnsSuccess() + { + // Lookup endpoints don't require auth + var freshClient = new LookupApiClient(CreateFreshClient()); + + // Act + var result = await freshClient.FindItemsAsync("test"); + + // Assert + result.IsSuccess.ShouldBeTrue(); + result.Value.ShouldNotBeNull(); + } + + [Fact] + public async Task FindProfitCentersAsync_ReturnsSuccess() + { + // Act + var result = await LookupClient.FindProfitCentersAsync("test"); + + // Assert + result.IsSuccess.ShouldBeTrue(); + } + + [Fact] + public async Task FindWorkCentersAsync_ReturnsSuccess() + { + // Act + var result = await LookupClient.FindWorkCentersAsync("test"); + + // Assert + result.IsSuccess.ShouldBeTrue(); + } + + [Fact] + public async Task FindOperatorsAsync_ReturnsSuccess() + { + // Act + var result = await LookupClient.FindOperatorsAsync("test"); + + // Assert + result.IsSuccess.ShouldBeTrue(); + } +}