Mit Roslyn umbenannt (Verweise folgen, Zeichenketten bleiben unberuehrt). Nicht umbenannt, weil gespeichert oder ueber die API gebunden (Stufe 4e): Properties, Record-Parameter, Enum-Member sowie die Parameter der Endpunkt-Handler (Routen-/Query-Bindung ueber den Namen). Die JSON-Felder anonymer Objekte bleiben ausdruecklich benannt (JsonFilter: pfad). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
33 lines
964 B
C#
33 lines
964 B
C#
using ClawdDotNet.Web.Contracts;
|
|
using Shouldly;
|
|
|
|
namespace ClawdDotNet.Web.Tests;
|
|
|
|
/// <summary>
|
|
/// Tests for the internal agent communication A2A (#208).
|
|
/// </summary>
|
|
public sealed class AgentCommunicationTests
|
|
{
|
|
[Fact]
|
|
public void AgentCommunicationDto_stores_fields_correctly()
|
|
{
|
|
var now = DateTime.UtcNow;
|
|
var dto = new AgentCommunicationDto(
|
|
TargetAgentId: "editor-1",
|
|
TargetAgentName: "Editor",
|
|
SourceAgentId: "scout-1",
|
|
SourceAgentName: "Scout",
|
|
Role: "user",
|
|
Content: "Bitte bearbeite Datei X",
|
|
Timestamp: now);
|
|
|
|
dto.TargetAgentId.ShouldBe("editor-1");
|
|
dto.TargetAgentName.ShouldBe("Editor");
|
|
dto.SourceAgentId.ShouldBe("scout-1");
|
|
dto.SourceAgentName.ShouldBe("Scout");
|
|
dto.Role.ShouldBe("user");
|
|
dto.Content.ShouldBe("Bitte bearbeite Datei X");
|
|
dto.Timestamp.ShouldBe(now);
|
|
}
|
|
}
|