mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-03-27 14:33:55 +00:00
24 lines
548 B
C#
24 lines
548 B
C#
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
|
using System;
|
|
using System.Linq;
|
|
|
|
namespace Tgstation.Server.Api.Models.Tests
|
|
{
|
|
/// <summary>
|
|
/// Tests for the <see cref="ErrorMessageResponse"/> class.
|
|
/// </summary>
|
|
[TestClass]
|
|
public sealed class TestErrorCodeExtensions
|
|
{
|
|
[TestMethod]
|
|
public void TestAllErrorCodesHaveDescriptions()
|
|
{
|
|
foreach (var I in Enum.GetValues(typeof(ErrorCode)).Cast<ErrorCode>())
|
|
{
|
|
var message = I.Describe();
|
|
Assert.IsNotNull(message, $"Error code {I} has no message!");
|
|
}
|
|
}
|
|
}
|
|
}
|