Files
tbd-station-14/Content.Tests/Shared/WireHackingTest.cs
Flipp Syder 2c6158e115 Wires refactor (#7699)
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Co-authored-by: Kara <lunarautomaton6@gmail.com>
2022-05-06 12:35:06 +10:00

43 lines
1.3 KiB
C#

using System;
using System.Collections.Generic;
using Content.Shared.Wires;
using NUnit.Framework;
using Robust.UnitTesting;
namespace Content.Tests.Shared
{
// Making sure nobody forgets to set values for these wire colors/letters.
// Also a thinly veiled excuse to bloat the test count.
[TestFixture]
public sealed class WireHackingTest : RobustUnitTest
{
public static IEnumerable<WireColor> ColorValues = (WireColor[]) Enum.GetValues(typeof(WireColor));
public static IEnumerable<WireLetter> LetterValues = (WireLetter[]) Enum.GetValues(typeof(WireLetter));
[Test]
public void TestColorNameExists([ValueSource(nameof(ColorValues))] WireColor color)
{
Assert.DoesNotThrow(() => color.Name());
}
[Test]
public void TestColorValueExists([ValueSource(nameof(ColorValues))] WireColor color)
{
Assert.DoesNotThrow(() => color.ColorValue());
}
[Test]
public void TestLetterNameExists([ValueSource(nameof(LetterValues))] WireLetter letter)
{
Assert.DoesNotThrow(() => letter.Name());
}
[Test]
public void TestLetterLetterExists([ValueSource(nameof(LetterValues))] WireLetter letter)
{
Assert.DoesNotThrow(() => letter.Letter());
}
}
}