Files
tbd-station-14/Content.IntegrationTests/Tests/Atmos/ConstantsTest.cs
DrSmugleaf 34b2902641 Fix errors with creating gas mixtures on class instantiation (#1916)
* Fix errors when gas mixtures are created on class instantiation

* Fix mistake
2020-08-25 16:53:59 +02:00

33 lines
897 B
C#

using System;
using System.Linq;
using System.Threading.Tasks;
using Content.Server.GameObjects.EntitySystems;
using Content.Shared.Atmos;
using NUnit.Framework;
using Robust.Shared.GameObjects.Systems;
namespace Content.IntegrationTests.Tests.Atmos
{
[TestFixture]
[TestOf(typeof(Atmospherics))]
public class ConstantsTest : ContentIntegrationTest
{
[Test]
public async Task TotalGasesTest()
{
var server = StartServerDummyTicker();
await server.WaitIdleAsync();
server.Post(() =>
{
var atmosSystem = EntitySystem.Get<AtmosphereSystem>();
Assert.That(atmosSystem.Gases.Count(), Is.EqualTo(Atmospherics.TotalNumberOfGases));
Assert.That(Enum.GetValues(typeof(Gas)).Length, Is.EqualTo(Atmospherics.TotalNumberOfGases));
});
}
}
}