Equip clothing to preview dummies in the lobby.
This commit is contained in:
58
Content.Tests/Shared/EquipmentSlotDefinesTest.cs
Normal file
58
Content.Tests/Shared/EquipmentSlotDefinesTest.cs
Normal file
@@ -0,0 +1,58 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using Content.Shared.GameObjects.Components.Inventory;
|
||||
using NUnit.Framework;
|
||||
using static Content.Shared.GameObjects.Components.Inventory.EquipmentSlotDefines;
|
||||
|
||||
namespace Content.Tests.Shared
|
||||
{
|
||||
[TestFixture]
|
||||
[Parallelizable(ParallelScope.All)]
|
||||
[TestOf(typeof(EquipmentSlotDefines))]
|
||||
public class EquipmentSlotDefinesTest
|
||||
{
|
||||
/// <summary>
|
||||
/// Test that all slots are contained in <see cref="AllSlots" />
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void TestAllSlotsContainsAll()
|
||||
{
|
||||
foreach (var slotObj in Enum.GetValues(typeof(Slots)))
|
||||
{
|
||||
var slot = (Slots) slotObj;
|
||||
|
||||
if (slot == Slots.NONE || slot == Slots.LAST)
|
||||
{
|
||||
// Not real slots, skip these.
|
||||
continue;
|
||||
}
|
||||
|
||||
Assert.That(AllSlots.Contains(slot));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test that every slot has an entry in <see cref="SlotNames" />.
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void TestSlotNamesContainsAll()
|
||||
{
|
||||
foreach (var slot in AllSlots)
|
||||
{
|
||||
Assert.That(SlotNames, Contains.Key(slot));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test that every slot has an entry in <see cref="SlotMasks" />.
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void TestSlotMasksContainsAll()
|
||||
{
|
||||
foreach (var slot in AllSlots)
|
||||
{
|
||||
Assert.That(SlotMasks, Contains.Key(slot));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user