namespace ZB.MOM.WW.LmxProxy.Client.IntegrationTests;

public class CheckApiKeyTests : IntegrationTestBase
{
    [Fact]
    public async Task CheckApiKey_ValidReadWrite_ReturnsValid()
    {
        var info = await Client!.CheckApiKeyAsync(ReadWriteApiKey);
        Assert.True(info.IsValid);
    }

    [Fact]
    public async Task CheckApiKey_ValidReadOnly_ReturnsValid()
    {
        var info = await Client!.CheckApiKeyAsync(ReadOnlyApiKey);
        Assert.True(info.IsValid);
    }

    [Fact]
    public async Task CheckApiKey_Invalid_ReturnsInvalid()
    {
        var info = await Client!.CheckApiKeyAsync("totally-invalid-key-12345");
        Assert.False(info.IsValid);
    }
}
