Phase 5c (owner review 2, R8) is built by six packages in parallel. This commit settles everything they share, so each one touches its own files: - job kinds WorkspaceRender (21), WorkspaceSend (22) and WorkspaceMove (23) with their wire names, default priorities, notices and parameter records; their handlers are registered as skeletons that throw until their package lands - WorkspaceJobOptions and a new CreateHandlers overload; the earlier ones stay and default the options - originals in the media index (an index of phase 5b reads as proxies only), their file names, and the exports/renders.json ledger of local renders, written atomically - the optional project and version of an uploaded render - the workspace settings (size limit, default media, version on render, clean-up age, project to open) and when each project was opened, which Reset and Import keep and Export leaves out - WorkspaceHost split into partial files, with stubs for usage, trash and the folder move, removal hooks for unsent renders and last originals, and a guard that holds work while the workspace moves - every new string of the phase in English and Italian, with tooltips Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
32 lines
1.1 KiB
C#
32 lines
1.1 KiB
C#
using Chronos.Core.Model;
|
|
using Chronos.Data.Jobs;
|
|
using Chronos.Testing;
|
|
|
|
namespace Chronos.Data.Tests.Jobs;
|
|
|
|
/// <summary>The names the jobs' kinds carry on the wire and in settings (BRIEF §14.6): stable once shipped.</summary>
|
|
[Category("jobs")]
|
|
public sealed class JobWireTests
|
|
{
|
|
[Theory]
|
|
[Case(JobKind.WorkspaceCopy, 20, "workspace-copy")]
|
|
[Case(JobKind.WorkspaceRender, 21, "workspace-render")]
|
|
[Case(JobKind.WorkspaceSend, 22, "workspace-send")]
|
|
[Case(JobKind.WorkspaceMove, 23, "workspace-move")]
|
|
public void TheWorkspaceJobsKeepTheirValueAndName(JobKind kind, int value, string name)
|
|
{
|
|
Assert.Equal(value, (int)kind);
|
|
Assert.Equal(name, JobWire.Kind(kind));
|
|
Assert.True(JobWire.TryParseKind(name, out var parsed), name);
|
|
Assert.Equal(kind, parsed);
|
|
}
|
|
|
|
[Test]
|
|
public void EveryKindHasItsOwnName()
|
|
{
|
|
var names = Enum.GetValues<JobKind>().Select(JobWire.Kind).ToList();
|
|
Assert.Equal(names.Count, names.Distinct(StringComparer.Ordinal).Count());
|
|
Assert.False(JobWire.TryParseKind("workspace-teleport", out _));
|
|
}
|
|
}
|