Wire hacking is now fancy.
1. new UI 2. wires are correctly randomized. 3. wires layouts are shared across machines in the same round.
This commit is contained in:
43
Content.Tests/Shared/WireHackingTest.cs
Normal file
43
Content.Tests/Shared/WireHackingTest.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Content.Shared.GameObjects.Components;
|
||||
using NUnit.Framework;
|
||||
using Robust.UnitTesting;
|
||||
using static Content.Shared.GameObjects.Components.SharedWiresComponent;
|
||||
|
||||
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 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());
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user