V13-FE-011: finalize search list layout slice
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
using Shared.Contracts.Generated;
|
||||
using Xunit;
|
||||
|
||||
namespace Shared.Contracts.Tests;
|
||||
|
||||
public sealed class KbxApiCatalogTests
|
||||
{
|
||||
[Fact]
|
||||
public void Operation_ids_and_routes_are_unique()
|
||||
{
|
||||
Assert.NotEmpty(KbxApiCatalog.SourceSha256);
|
||||
Assert.Equal(KbxApiCatalog.All.Count, KbxApiCatalog.All.Select(x => x.Id).Distinct().Count());
|
||||
Assert.Equal(KbxApiCatalog.All.Count, KbxApiCatalog.All.Select(x => $"{x.Method} {x.Path}").Distinct().Count());
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Required_idempotency_is_not_used_by_get_queries()
|
||||
{
|
||||
Assert.DoesNotContain(KbxApiCatalog.All, x => x.Method == "GET" && x.Idempotency == "required");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
using Kbx.Contracts.Generated;
|
||||
using Xunit;
|
||||
|
||||
namespace Kbx.Contracts.Tests;
|
||||
|
||||
public sealed class KbxFieldCatalogTests
|
||||
{
|
||||
[Fact]
|
||||
public void Sensitive_fields_have_masking_metadata()
|
||||
{
|
||||
var invalid = KbxFieldCatalog.All.Where(x => x.Sensitive && string.IsNullOrWhiteSpace(x.Masking)).ToArray();
|
||||
Assert.Empty(invalid);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Order_quantity_is_canonical()
|
||||
{
|
||||
var field = KbxFieldCatalog.Get(KbxFieldKeys.OrderQty);
|
||||
Assert.Equal("quantity", field.DataType);
|
||||
Assert.True(field.Importable);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user