Equip clothing to preview dummies in the lobby.

This commit is contained in:
Pieter-Jan Briers
2020-01-20 09:20:36 +01:00
parent 03bfb22559
commit 75aa9541e0
7 changed files with 166 additions and 24 deletions

View 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));
}
}
}
}