2969805e4e
Claude-Session: https://claude.ai/code/session_013L3XdmVii9i5sY4FChU8pB
17 lines
638 B
C#
17 lines
638 B
C#
namespace ZB.MOM.WW.Auth.ApiKeys.SqlServer.Tests;
|
|
|
|
public sealed class SqlServerApiKeyOptionsTests
|
|
{
|
|
[Fact]
|
|
public void Validate_RejectsMissingConnectionString() =>
|
|
Assert.Throws<InvalidOperationException>(() => new SqlServerApiKeyOptions { ConnectionString = " " }.Validate());
|
|
|
|
[Fact]
|
|
public void Validate_RejectsUnsafeSchemaName() =>
|
|
Assert.Throws<InvalidOperationException>(() => new SqlServerApiKeyOptions { ConnectionString = "Server=x", Schema = "zb;auth" }.Validate());
|
|
|
|
[Fact]
|
|
public void Schema_DefaultsToZbauth() =>
|
|
Assert.Equal("zbauth", new SqlServerApiKeyOptions().Schema);
|
|
}
|