tests/SboxSuperuser.Contracts.Tests/PrivateReplyConstructionTests.cs

A unit test file that checks validation rules for constructing a private reply. It calls PrivateReplyValidation.IsValid with Guid, status and arrays to ensure whitespace-only strings are rejected.

using SboxSuperuser.Engine.Commands;
using Xunit;

namespace SboxSuperuser.Contracts.Tests;

public sealed class PrivateReplyConstructionTests
{
	[Fact]
	public void ReceiverRejectsWhitespaceThatCannotConstructAResult()
	{
		Assert.False( PrivateReplyValidation.IsValid( Guid.NewGuid(), CommandStatus.Success, " ", Array.Empty<string>(), Array.Empty<string>() ) );
		Assert.False( PrivateReplyValidation.IsValid( Guid.NewGuid(), CommandStatus.Success, "Done", new[] { " " }, new[] { "value" } ) );
	}
}