17 lines
715 B
C#
17 lines
715 B
C#
|
|
using Mishima.Nexus.Wire.V1;
|
||
|
|
|
||
|
|
namespace Robotico.Nexus.Client.Tests.TestSupport;
|
||
|
|
|
||
|
|
/// <summary>Shared <see cref="NexusStatus"/> envelope builders for fake engine services.</summary>
|
||
|
|
public static class NexusStatuses
|
||
|
|
{
|
||
|
|
/// <summary>A fresh success envelope (mirrors the real wire's "OK" convention).</summary>
|
||
|
|
public static NexusStatus Ok => new() { Code = "OK", Message = string.Empty };
|
||
|
|
|
||
|
|
/// <summary>A coded failure envelope.</summary>
|
||
|
|
public static NexusStatus Failure(string code, string message) => new() { Code = code, Message = message };
|
||
|
|
|
||
|
|
/// <summary>A not-found failure envelope.</summary>
|
||
|
|
public static NexusStatus NotFound(string message) => Failure("NXS_NOT_FOUND", message);
|
||
|
|
}
|