elsa-core/test/unit/Elsa.Common.UnitTests/Entities/OrderDefinitionTests.cs
Sipke Schoorstra cec3281a20
[codex] Harden workflow JSON type resolution (#7499)
* Harden workflow JSON type resolution

* Harden workflow type alias serialization

* Register JSON island type aliases

* Fix workflow JSON aliases for runtime types

* Register CLR workflow type aliases at startup

* Register safe workflow serialization aliases

* Use registered workflow type aliases in serializers

* Restore trusted legacy workflow JSON aliases

* Share runtime workflow type alias registration

* Address workflow JSON review follow-ups

* Address workflow JSON review follow-ups

* Address workflow JSON review edge cases

* Address workflow JSON converter review feedback

* Register workflow JSON types for HTTP and JavaScript failures

* Address secure type serialization review comments

* Address deserialization review feedback

* Address workflow serialization review comments

* Address workflow type review feedback

* Tighten workflow type hardening fixes

* Avoid workflow alias string type resolution

* Address workflow type alias review feedback

* Stabilize publish event payload assertion

* Stabilize bulk dispatch component test

* Make workflow dictionary aliases idempotent

* Declare workflow runtime feature dependency

* Assert trigger payload alias serialization

* Import workflow helper contracts

* Avoid duplicate CLR workflow materialization

* Normalize workflow factory aliases
2026-05-22 15:25:49 +02:00

23 lines
566 B
C#

using System.Text.Json;
using Elsa.Common.Entities;
namespace Elsa.Common.UnitTests.Entities;
public class OrderDefinitionTests
{
[Fact]
public void Serialize_DoesNotIncludeKeySelectorText()
{
var order = new OrderDefinition<TestEntity, string>(x => x.Name, OrderDirection.Ascending);
var json = JsonSerializer.Serialize(order);
Assert.DoesNotContain(nameof(OrderDefinition<TestEntity, string>.KeySelectorText), json);
}
private sealed class TestEntity
{
public string Name { get; set; } = null!;
}
}