2020-05-27 15:09:22 +02:00
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
2021-06-09 22:19:39 +02:00
|
|
|
using Content.Shared.Wires;
|
2020-05-27 15:09:22 +02:00
|
|
|
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]
|
2022-02-16 00:23:23 -07:00
|
|
|
public sealed class WireHackingTest : RobustUnitTest
|
2020-05-27 15:09:22 +02:00
|
|
|
{
|
|
|
|
|
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());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|